I am really struggling to get an exact phase (2 words) to work against a plain text field.
So I have 3 pages.
I am searching against a field called metaDescription (Text Area).
I am using the external index and I can see the 3 pages are indexed. Just the default that Umbraco does. Nothing custom abaout this. I can see the field data is indexed as expected through the Umbraco Examine backend
Page 1:
metaData = Test Page
Page 2:
metaData = Test Page
Page 3:
metaData = Page
When I am searching the phrase "Test Page" all 3 pages come back every time. No matter what I try it always seems to be doing a multi word search.
I have tried each of the following plus a load of variations along the way...
They all return the exact same data - all 3 pages.
var searcher = index.Searcher;
var criteria = searcher.CreateQuery(IndexTypes.Content, BooleanOperation.And);
var examineQuery = criteria.NodeTypeAlias(ContentPage.ModelTypeAlias);
examineQuery.And().Field("metaDescription", new ExactPhraseExamineValue("Test Page".ToLower()));
This returned no results.
Is there a bug with Umbraco 11 getting exact term searching to work. I dont remember having these problems with Umbraco 7 and 8.
I have tied for most of the day with this one.
I am sure with the older versions this just worked out of the box.
And if you wanted to split the words then you did exactly that and passed in the array.
I know I could create a custom index and stip out the space between the indexed words. This wont really work through since I am trying to index a block of text rather than something short like the node name. I would prefer not to fiddle with how the content is indexed.
Umbraco 11| Examine Exact Phrase Term Search
Hi,
I am really struggling to get an exact phase (2 words) to work against a plain text field.
So I have 3 pages. I am searching against a field called metaDescription (Text Area).
I am using the external index and I can see the 3 pages are indexed. Just the default that Umbraco does. Nothing custom abaout this. I can see the field data is indexed as expected through the Umbraco Examine backend
Page 1: metaData = Test Page
Page 2: metaData = Test Page
Page 3: metaData = Page
When I am searching the phrase "Test Page" all 3 pages come back every time. No matter what I try it always seems to be doing a multi word search.
I have tried each of the following plus a load of variations along the way... They all return the exact same data - all 3 pages.
/
I also tried a few examples from other posts. Like this for example. https://our.umbraco.com/forum/using-umbraco-and-getting-started/80250-searching-for-phrases-using-examine
This returned no results.
Is there a bug with Umbraco 11 getting exact term searching to work. I dont remember having these problems with Umbraco 7 and 8. I have tied for most of the day with this one.
I am sure with the older versions this just worked out of the box.
And if you wanted to split the words then you did exactly that and passed in the array.
I know I could create a custom index and stip out the space between the indexed words. This wont really work through since I am trying to index a block of text rather than something short like the node name. I would prefer not to fiddle with how the content is indexed.
Any help would be much appreciated.
Thanks in advanced.
Anyone any ideas on this? Do we know if its a bug.
I want to avoid changing my code to use a raw lucene query which is starting to look like might be the best option.
I've also been having this issue. I tried this which didn't work
What did work for me was
is working on a reply...