Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
The basic thing is: I want to search for a phrase and want all of the words to present in the searched document.
The query must look like: (+field1: my + field1: phrase) or (+field2: my + field2: phrase) or (+field3: my + field3: phrase) etc..
How do I make this query with Lucene?
Update: I've managed to do this with:
var sc = CreateSearchCriteria(string.Empty, BooleanOperation.Or);sc.OrderBy("Score");var strArray = searchText.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(f => f.Fuzzy(0.8f)).ToArray();var searchFields = GetSearchFields();foreach (var field in searchFields){sc.GroupedAnd(Enumerable.Repeat(field, strArray.Length), strArray);}var siteResults = base.Search(sc, 100);
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Can't get proper Lucene query for my search
The basic thing is: I want to search for a phrase and want all of the words to present in the searched document.
The query must look like: (+field1: my + field1: phrase) or (+field2: my + field2: phrase) or (+field3: my + field3: phrase) etc..
How do I make this query with Lucene?
Update: I've managed to do this with:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.