Jump to content

Proximity search with a phrase search


markjrouse

Recommended Posts

Hi,

 

I'm trying to do a proximity search against phrase search but it does not seem to work. At the moment, my syntax is as follows:

 

"word1 spoke to"~5

 

I've tried variations on this:

 

"word1 "spoke to""~5

"word1 ("spoke to")"~5

 

I'm not sure if my current syntax is correct and whether it will returns matches of word1 against "spoke to", or whether "spoke to" gets evaluated as two words instead.

Link to comment
Share on other sites

Hi Mark,

 

Unfortunately phrase searches are not supported in proximity searches.

 

The reason is because the different search terms in a proximity search need to be enclosed in double quotes. A phrase also needs to be enclosed in double quotes however, you can not have nested double quotes (such as  "word1 "spoke to""~5) within a proximity search

 

A work around for showing all items where word1 is within 5 words of "spoke to" could be done this way:

  • Run a proximity search for "word1 spoke"~5
  • Run a normal include search for "spoke to"

 

Note - This work around should do what you are trying to achieve however, there could be some false positives returned.

 

Regards

 

Jon

Link to comment
Share on other sites

×
×
  • Create New...