FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » Can we combine exclusion with proximity search?
Can we combine exclusion with proximity search? [message #1494] Wed, 27 July 2022 12:04 Go to next message
Atlas
Messages: 130
Registered: August 2009
Senior Member
Here's a search using Foxtrot Query Syntax on Contents Only: ["{5} inflation -job*"]. The purpose is to find all documents that contain the word "inflation" but not the word "job*" within 5 words of each other. However, this query gives back a document with the string "Currently, with Biden saying that it's the Fed's job to handle inflation" in its content, which is not what the query says.

And if I try the Foxtrot Query ["{5} -job inflation"], then there's no result at all, even though it's the exact same query as the first one, but with the order of the conditions flipped around.

I don't see an example of proximity search combined with exclusion in the Foxtrot documentation, so ... is the combination supported?

[Updated on: Wed, 27 July 2022 12:05]

Report message to a moderator

Re: Can we combine exclusion with proximity search? [message #1499 is a reply to message #1494] Wed, 27 July 2022 18:22 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 383
Registered: April 2020
Senior Member
Searching for ["{5} inflation -job*"] is not supposed to prevent finding documents containing these words within this proximity. However, the found documents should contain at least one (other) occurrence of [inflation] that is not in the given proximity to a word starting with job.

If you want to find documents that contain [biden], but no occurrence of [inflation] near [job*] (whether they actually contain some occurrences of [inflation] or [job*]), use: [biden -"{5}inflation job*"]

If you want to find documents that contain both [biden] and [inflation], but no occurrence of [inflation] near [job*], use: [biden inflation -"{5}inflation job*"]

Note that there is actually a bug, in the preview: when searching for ["{0} inflation -job*"], the correct documents should be found, however the occurrences of [inflation] are highlighted in the preview even in the proximity of [job*]; and occurrences of [job*] are also highlighted although there is no reason.

Quote:
And if I try the Foxtrot Query ["{5} -job inflation"], then there's no result at all, even though it's the exact same query as the first one, but with the order of the conditions flipped around.
- if you typed a space between } and -, there is a syntax error ("incorrect search string" should be displayed at the bottom of the search result list)
- but you are true, if you remove this space (and add the * after job), the results are different, and I don't think they should. We will take a look at this


Jérôme - FoxTrot Engineering
Re: Can we combine exclusion with proximity search? [message #1502 is a reply to message #1499] Thu, 28 July 2022 06:55 Go to previous message
Atlas
Messages: 130
Registered: August 2009
Senior Member
1. Your clarification that "the found documents should contain at least one (other) occurrence of [inflation] that is not in the given proximity to a word starting with job" is very helpful. I will need to play around with it some more to be certain that I understand what you mean. Thanks.

2. The exclusion syntax of Foxtrot query has been giving me a lot of problems. I remember a while back there was a bug where if I start a query with an exclusion syntax, then the query gives incorrect results. Maybe it's a similar problem with ["{5} -job inflation"], where I am starting the query with an exclusion condition as well. (maybe?)

3. Thanks for looking into the potential bug with ["{5} -job inflation"] vs ["{5} -job* inflation"]

[Updated on: Thu, 28 July 2022 07:06]

Report message to a moderator

Previous Topic: Is Foxtrot Query heading toward deprecation?
Next Topic: Set viewer default size?
Goto Forum:
  


Current Time: Fri Mar 29 00:05:15 GMT+1 2024