How to find results that do NOT match a keyword?
Is there any way I ca开发者_如何学编程n user a NOT or other negation operator before a text search keyword for example,
NOT program
When I do such a search there are 0 records returned. Please let me know some way to achieve this option.
In Solr you can use the '-' minus sign as a NOT operator, so you would change your query to be
*:* - program
If you are using SolrNet, since that is how your question is tagged, you can do the following
solr.Query(new SolrQuery("*:*") && !new SolrQuery("program"));
Please see Querying in SolrNet for more details.
Updated: Per comment from Mauricio Scheffer
There aren't any search operators that perform the search parameters you are describing. My advice is to use the Google advanced search features. You can make your search much more specific in a number of ways, its really advanced.
精彩评论