solr way to exclude terms
Is there a solr way to remove any result from the list search results that contain a term in a excluding list? For example, suppose I search for apple and get 5 documents contains it, and my excluding list is something like ['bad', 'wrong', 'staled']. Out of the 5 documents, 3 has a word in this list, so I want solr to return only the other 2 documents. I know exclude will work, but my list is super long and I don't want have a very long url. I know stopwords is not returning the thing I want. So is there something I don't know that would work as expected? Thanks a lot! angela
Re: solr way to exclude terms
One of the approaches is to index create a new field based on the stopwords (ie accept only stopwords :)) - ie. if the documents contains them, you index 1 - and use a q=applefq=bad_apple:0 This has many limitations (in terms of flexibility), but it will be superfast roman On Mon, Jul 8, 2013 at 4:14 PM, Angela Zhu ang...@squareup.com wrote: Is there a solr way to remove any result from the list search results that contain a term in a excluding list? For example, suppose I search for apple and get 5 documents contains it, and my excluding list is something like ['bad', 'wrong', 'staled']. Out of the 5 documents, 3 has a word in this list, so I want solr to return only the other 2 documents. I know exclude will work, but my list is super long and I don't want have a very long url. I know stopwords is not returning the thing I want. So is there something I don't know that would work as expected? Thanks a lot! angela
Re: solr way to exclude terms
What is the actual use case? In other words, why is the list so long? Maybe exclusion by keyword is not the proper solution... but we need what the underlying problem is. Is this for document access control? -- Jack Krupansky -Original Message- From: Angela Zhu Sent: Monday, July 08, 2013 4:14 PM To: solr-user@lucene.apache.org Subject: solr way to exclude terms Is there a solr way to remove any result from the list search results that contain a term in a excluding list? For example, suppose I search for apple and get 5 documents contains it, and my excluding list is something like ['bad', 'wrong', 'staled']. Out of the 5 documents, 3 has a word in this list, so I want solr to return only the other 2 documents. I know exclude will work, but my list is super long and I don't want have a very long url. I know stopwords is not returning the thing I want. So is there something I don't know that would work as expected? Thanks a lot! angela