Logical operators in "Search" not working

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
apollo707
User
Posts: 2
Joined: Wed Oct 23, 2013 4:41 am

Logical operators in "Search" not working

Post by apollo707 »

In 3.0.305: Logical operators in "Search" are not working. If I type in

Code: Select all

hot OR cold
I get search results for "hot", "cold" and "or"...
1. WHAT would you like to search? Enter the text you wish to search for in this field.
Note that “Search” supports the following logical operators:

AND. It can be used between two words to find both terms, in any order. Whitespace is used to specify logical AND, as it is the default operator for joining search terms.
NOT. It is used before a search term to exclude any documents that contain that term.
OR. It is used to search for all instances of either term.
https://help.pdf-xchange.com/EU/def ... v3x:search
Willy Van Nuffel
User
Posts: 2394
Joined: Wed Jan 18, 2006 12:10 pm

Re: Logical operators in "Search" not working

Post by Willy Van Nuffel »

At my opinion the text in the help needs revision.

When you "Enter words or phrase..." in the first textbox (of the Search panel), these words must 'all' be part of the text that want to search and must be in the right order (sequence). I do not have the intention that AND or OR are allowed.
In either case it does not seem to work.

When you choose "Advanced Criterion", you can enter text in the boxes below 'Find text with'.
There you can choose to use one or more possibilities (depending of search in one or more documents):
- first textbox "all these words"
- second textbox "any of these words"
- third text "none of these words"
You also have the possibility to only search 'In active document', or 'In all opened documents'.

So, in your exemple, (looking for 'hot' or 'cold') you will have to use the "Advanced Criterion", enter the words 'hot cold' in the second textbox, and (below 'WHERE would you like to search ?) the option "In active document".
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Logical operators in "Search" not working

Post by Will - Tracker Supp »

Hi Guys,

Thanks for the posts - I will give this a test and, if I'm able to reproduce the issue, I'll create a ticket and forward it to the Dev. Team to look into.

Cheers,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Logical operators in "Search" not working

Post by Will - Tracker Supp »

Hi guys,

Using the advanced search, as Willy mentioned, is working fine for me, but I believe that I initially misunderstood the problem - to use the advanced search to achieve this, you would have to remove the word " OR " and search for "hot cold" in the "Any of these words" field, as Willy suggested. The reason for this, is because adding the ability to use the booleans AND and OR could potentially cause a logical problem for the Editor, as there may be instances of OR/AND within the text of the document, and the Editor wouldn't know whether to actually search for those, or omit them and use the terms, when input into the search field, as search parameters.

Cheers,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
apollo707
User
Posts: 2
Joined: Wed Oct 23, 2013 4:41 am

Re: Logical operators in "Search" not working

Post by apollo707 »

Willy Van Nuffel wrote:At my opinion the text in the help needs revision.

When you "Enter words or phrase..." in the first textbox (of the Search panel), these words must 'all' be part of the text that want to search and must be in the right order (sequence). I do not have the intention that AND or OR are allowed.
In either case it does not seem to work.

When you choose "Advanced Criterion", you can enter text in the boxes below 'Find text with'.
There you can choose to use one or more possibilities (depending of search in one or more documents):
- first textbox "all these words"
- second textbox "any of these words"
- third text "none of these words"
You also have the possibility to only search 'In active document', or 'In all opened documents'.

So, in your exemple, (looking for 'hot' or 'cold') you will have to use the "Advanced Criterion", enter the words 'hot cold' in the second textbox, and (below 'WHERE would you like to search ?) the option "In active document".
Yes, the same thing can be achieved with Advanced Search. But that's not the point. Advanced search requires too many steps and takes up too much space for me and according to the manual boolean operators should work in the standard search field. Just like they did in PDF-XChange Viewer. Just because there's a workaround or alternative way of achieving things doesn't mean this isn't a bug.
Will - Tracker Supp wrote:Hi guys,

Using the advanced search, as Willy mentioned, is working fine for me, but I believe that I initially misunderstood the problem - to use the advanced search to achieve this, you would have to remove the word " OR " and search for "hot cold" in the "Any of these words" field, as Willy suggested. The reason for this, is because adding the ability to use the booleans AND and OR could potentially cause a logical problem for the Editor, as there may be instances of OR/AND within the text of the document, and the Editor wouldn't know whether to actually search for those, or omit them and use the terms, when input into the search field, as search parameters.

Cheers,
My post was only about the standard search field. I wouldn't expect boolean operators to work in the Advanced search, since it already has dedicated fields for each boolean operator. Just like with Google's advanced search, you don't use operators when using dedicated search fields.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Logical operators in "Search" not working

Post by Will - Tracker Supp »

Hi apollo707,
Yes, the same thing can be achieved with Advanced Search. But that's not the point. Advanced search requires too many steps and takes up too much space for me and according to the manual boolean operators should work in the standard search field. Just like they did in PDF-XChange Viewer. Just because there's a workaround or alternative way of achieving things doesn't mean this isn't a bug.
This was actually never implemented in the simple search (the Find toolbar) of the Viewer, but the Search (Edit --> Search) did allow this - this was removed in the Editor because, as previously stated, there was too much potential for issues to arise. For now, the Advanced search criteria are your best workaround. We are, however looking into the possibility and practicality of creating something like a checkbox that, when checked, recognizes booleans like "OR" or "AND", which would then remove the necessity to go through as many steps.

Cheers,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Post Reply