You are viewing limited content. For full access, please sign in.

Question

Question

Searching a text field - strange results!

asked on September 1, 2016

Hello!

I'm seeing strange results reported by some of our folks and I'm wondering what is going on.

Server and client version 9.2.0 build 343

We have an indexed text field as part of the template.  This text field includes slashes, spaces, and dashes.  For example:

1009

1009-123

1009/1234

123-1009

 

So... if we do a template search on that field for 1009, we get all the results listed above.  Even using quotes.  Fuzzy is off. Variations of root word is off.

 

[5 minutes later]

Ok, so progress.  If I turn off the index of that field, and restart the client, the search works as expected.  

So, what's going on here?  If I needed to have that field indexed, how could I search for just documents with the field == "1009"  ?

 

Thanks in advance!

 

0 0

Answer

SELECTED ANSWER
replied on September 1, 2016 Show version history

This is the expected/intended behavior for an indexed field. This behavior (as well as fuzzy and root variation) is why we don't recommend indexing ID-like fields.

Indexed searches add fuzzy and root word variation, as you noted, but what you are seeing is that they also perform a search within the text of a field.

Think of when you search on document text: if you want to return a document with the word "Laserfiche" in it, you perform a search for the word Laserfiche with no wildcards, and it returns all documents where the word appears ANYWHERE within the document text.

This acts the same way. Without fuzzy search and root word variation, the results will be the same as a non-indexed search with leading and trailing wildcards --- in your case, *1009*.

One final piece to answer your puzzle: when indexing, all punctuation is treated as spaces. That is,  1009-001  is the same as 1009 001 for an indexed search.

As a workaround, you can change the syntax generated by your search to force a non-indexed search. You should see a ~= instead of just a = in your search syntax, such as {[yourTemplate]:[yourField]~="1009"} . If you remove the ~, so that you have {[yourTemplate]:[yourField]="1009"}, a non-indexed search will be performed.

2 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.