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

Question

Question

Search with "and" operator not working as expected

asked on January 24, 2019

I have a client the is relying heavily on full-text searching. One of the searches they are looking to do is search for multiple words or phrases.  We have tried using the text search in windows client with the AND option and what is happening is the first context hit is only 1 word and not both. Its the first page in the document that has one of the words, but I was hoping it would show the first page with both words. I have to click down rank 4 or 5 to get the first page with both terms. 

I thought the context hits would start with the first page with both terms and not just the first page with  1 term. Am I missing something? 

0 0

Replies

replied on January 24, 2019

Have you tried searching with "within" instead of "and"?  Try looking for the words close together instead of just somewhere in the text.

TextSearch.png
TextSearch.png (8.24 KB)
1 0
replied on January 25, 2019

Hello Jennifer, 

That worked. When I test in my own system, The first context hit in now a page with both terms. What is frustrating is that the "and" operator to me should accomplish this task. The behavior I'm seeing is more like an "or" operator. Thanks for the help. 

Any input from Laserfiche on the true definition of the "and" operator? 

0 0
replied on March 12, 2019

I think it's not searching for pages with both those words, but just documents with both those words. That's why WITHIN works for your case but AND doesn't.

Page divisions are somewhat arbitrary (e.g. your desired words might occur as the last word of one page and the first word of another), which is probably why we have AND apply to the entire document.

0 0
replied on January 28, 2019

Can you take a screenshot of the original search query? Not just the search results.

0 0
replied on March 12, 2019

Hello Leif, 

The original search query was like this.

Which i just tested on my repo and this was the results. 

Notice how none of the hits have both words. Why does "and" not work the way I would expect.  

0 0
replied on March 12, 2019 Show version history

The AND search returns documents that have term1 (one or more times) AND term2 (one or more times) anywhere in the document .  This means that if you search a 100 page document, sword can be on page 1 and chariot can be on page 100 and the document meets the AND criteria so will be returned in the results. Each term is an independent object to search for, therefore each instance of term1 is a hit and each instance of term2 is a hit, so the results you show in your screenshot is the expected behavior of an AND search.

The AND implies nothing more than that the terms are contained within the same document.

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

Sign in to reply to this post.