Re: Searching for a term which isn't a part of an expression

2016-12-15 Thread Dean Gurvitz
I think queries would usually not contain more than one phrase per query, but there isn't a fixed list. Anyways, your solution is very very good for us. We could write a QueryParser or a SearchComponent that edits the Lucene Query object in the ResponseBuilder to include the relevant SpanNotQuery.

Re: Searching for a term which isn't a part of an expression

2016-12-15 Thread Ahmet Arslan
Hi, Span query family would be a pure query-time solution, SpanNotQuery in particular. SpanNearQuery include = new SpanTermQuery(new Term(FIELD, "world"); SpanNearQuery exclude = new SpanNearQuery(new SpanQuery[] { new SpanTermQuery(new Term(FIELD, "hello")), new SpanTermQuery(new Term(FIELD

Re: Searching for a term which isn't a part of an expression

2016-12-14 Thread Dean Gurvitz
Hi, The list of phrases wil be relatively dynamic, so changing the indexing process isn't a very good solution for us. We also considered using a PostFilter or adding a SearchComponent to filter out the "bad" results, but obviously a true query-time support would be a lot better. On Wed, Dec 14,

Re: Searching for a term which isn't a part of an expression

2016-12-14 Thread Ahmet Arslan
Hi, Do you have a common list of phrases that you want to prohibit partial match? You can index those phrases in a special way, for example, This is a new world hello_world hot_dog tap_water etc. ahmet On Wednesday, December 14, 2016 9:20 PM, deansg wrote: We would like to enable queries for

Searching for a term which isn't a part of an expression

2016-12-14 Thread deansg
We would like to enable queries for a specific term that doesn't appear as a part of a given expression. Negating the expression will not help, as we still want to return items that contain the term independently, even if they contain full expression as well. For example, we would like to search fo