I would like to make an advanced search for repos under github for commits which match the conditions below:
- Language: Javascript
- Created: [2011-01-01 TO NOW]
- Pushed: [2012-05-01 TO NOW]
- Forks: [100 TO *]
- Size: [100 TO 1000] //(kb)
I know that github uses Lucene to perform its searchs, but searching around I can't find any documentation on query syntax, and if I follow the guidelines of the apache Lucene documentation I often end up with an "Invalid query syntax" message.
For my personal query I have already passed the language, size and forks queries with no problem, but I still have problem to find a good match to perform a query syntax based on dates.
Is it mandatory that I have to include the Timestamp in the date queries?
Could I make some computation for dates like NOW - 3MONTHS?
For example, how could I search repos that were created 4 MONTHS AGO TO NOW?
EDIT:
I talked to github support and they said to me that they use the Solr query syntax which allows the date range queries using calculations such as NOW - 4MONTHS
, but for some reason it doesn't work ok for me or I just don't understand how these filters operate (created and pushed).
Just to test it, I tried to find any Repos, with Javascript as the main language, both of this selected from the combo boxes and then try to search using the [created} filter and see what strange results I have.
For the first search I try to find any javascript repo created between today and 12 months ago.
created:[NOW-12MONTHS/DAY TO NOW/DAY]
That gives me a total of 233500 Repos and I have listed the "twitter/bootstrap" repo at the top.
For the second search I tried to find any Javascript repo created between today and 24 months ago.
created:[NOW-24MONTHS/DAY TO NOW/DAY]
Not only it gives me less repos than before, 11867 in total, but I don't have the "twitter/bootstrap" repo listed any more in the results page (which I think is wrong because my second search "contains" the first one). The first result has less watchers than "twitter/bootstrap" and if I order the results by watchers count it would be wrong to not have it at the top!
I'm not saying that there is a bug on the site, but I just don't understand how it works for doing calculations with date ranges. Hope someone can help me clarify my issues.