I am looking at the query syntax. and i could not figure out how to search 'and'. I tried "a sentence with and and words after it" i tried +and and \and. It always ignored it. How can i search 'and'? I am using lucene.net
+3
A:
Are you including 'and' in the index so its searchable?
If your using the StandardAnalyzer to index your documents, 'and' is included in the default stop words list. You can pass your own list of stop words as a string array to the constructor of the StandardAnalyzer if you want to include the word 'and' in the index.
Binary Nerd
2010-03-30 00:38:47
A:
Have you tried AND in all caps?
If you want to do an AND search, you have a couple options. You can do
+foo +bar
or
foo AND bar
but
foo and bar
will not work.
bajafresh4life
2010-03-30 01:24:07
no i am not trying to do an and search and if you mean search and then no that does not work either (i ran it using AND and got no results)
acidzombie24
2010-03-30 05:05:08
gotcha, misunderstood the question.
bajafresh4life
2010-03-30 13:43:32