资源工具
2012-11-19 11:32 三戒1993 阅读(79) 评论(0) 编辑 收藏 举报持续更新中....
如何结合使用 SVN 和 Eclipse
http://www.51zxw.net/study.asp?vip=6330545
followers:[100 TO *]
should do what you want: see your query with 100
or more followers.
(Note: the "TO
"
needs to be in uppercase)
(Source: New and Improved Search)
search Users using RubyFor example, we can search:
- for people with a username fuzzily similar to ‘
chacon
’- who use
Ruby
as their primary language,- have at least 5 repos and
- at least one follower:
chacon~0.3 repos:[5 TO *] followers:[1 TO *]
2
2
|
I would like to make an advanced search for repos under github for commits which match the conditions below:
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? 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 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.
|
|||
Was this post useful to you?
|
2
|
It's ugly, but you could wrap a layer around the search that interprets these date queries specially. For example, rewriting "Created:[NOW-4MONTHS to NOW]" to "Created:[2012-01-21 TO 2012-05-20]" before passing the query to Lucene. Among the problems you'll have with this approach:
As far as I know, a range query cannot have a subquery inside of it, so you might be able to just use regular expressions to detect your date range queries, especially if you can count on specific field name(s) for the date/time queries. |
||
feedback
|
2
|
Note that since November 26th, 2012 ("Search Syntax Improvements") (by Tim Pease), the Solr-style syntax for comparison and range criteria is no longer the only alternative. So searching for items with more than 10 stars looked like:
Now it is:
However range doesn't support Solr-like syntax like now, you need to specify dates, but withouttimestamps. |
||
feedback
|
1
|
Check the Solr documentation page for exact syntax: http://wiki.apache.org/solr/SolrQuerySyntax For the date searches the syntax is like this:
|
2
2
|
I would like to make an advanced search for repos under github for commits which match the conditions below:
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? 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 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.
|
|||
Was this post useful to you?
|
2
|
It's ugly, but you could wrap a layer around the search that interprets these date queries specially. For example, rewriting "Created:[NOW-4MONTHS to NOW]" to "Created:[2012-01-21 TO 2012-05-20]" before passing the query to Lucene. Among the problems you'll have with this approach:
As far as I know, a range query cannot have a subquery inside of it, so you might be able to just use regular expressions to detect your date range queries, especially if you can count on specific field name(s) for the date/time queries. |
||
feedback
|
2
|
Note that since November 26th, 2012 ("Search Syntax Improvements") (by Tim Pease), the Solr-style syntax for comparison and range criteria is no longer the only alternative. So searching for items with more than 10 stars looked like:
Now it is:
However range doesn't support Solr-like syntax like now, you need to specify dates, but withouttimestamps. |
||
feedback
|
1
|
Check the Solr documentation page for exact syntax: http://wiki.apache.org/solr/SolrQuerySyntax For the date searches the syntax is like this:
|
Have feedback? Let @github know on Twitter
We make sure to read every mention on Twitter. If you find a bug, submit it tosupport@github.com. Every email is read by a real person.
版权声明:本文为博主原创文章,未经博主允许不得转载。