solved Searching with AND operator

lornawebber
@lornawebber
6 years ago
334 posts
Has anything changed in the search function recently (in the past month). I used to be able to use the AND operator to search for images with two terms together. This no longer seems to work on our site. Results are returned as though the AND is not there, i.e. AND behaves the same way as OR.

Is this a problem that requires the Search index to be rebuilt?

It would be extremely helpful to have a definitive search guide as suggested by @researchcooperative on the documentation page for Search https://www.jamroom.net/the-jamroom-network/documentation/modules/950/search
I have put something in our documentation but I would like to verify it.
updated by @lornawebber: 07/12/18 03:47:15PM
brian
@brian
6 years ago
10,148 posts
I'm not seeing any issues with AND here - for example we have one document that has phpstorm AND ubuntu AND jetbrains in it, but if they were all "OR"'d we have several more.

https://www.jamroom.net/search/results/all/1/4?search_string=phpstorm+AND+jetbrains+AND+ubuntu

Can you post the URL to a search that does not appear to be working?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
lornawebber
@lornawebber
6 years ago
334 posts
Sure - here's one https://pmp-art.com/gallery/ss=green%20AND%20apple

It returned (amongst others) this one https://pmp-art.com/steve-lyddon/gallery/86980 which has only "green" in title, description and tags, and this one https://pmp-art.com/mido/gallery/135305 which has only "apple".

I notice our search hasn't converted the spaces to "+" signs as shown in your url.
brian
@brian
6 years ago
10,148 posts
This has been fixed in the latest Search module update - upgrade and let us know if that looks better.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
lornawebber
@lornawebber
6 years ago
334 posts
@brian Thank you very much for this fix - it's going to save me so much time!
We have the page jumper on our gallery, and one thing I noticed is that the first page of results initially shows as 1/n where n is 'total pages in the gallery' and not 'total pages of search results'. Moving forward to page 2 corrects this.
brian
@brian
6 years ago
10,148 posts
lornawebber:
We have the page jumper on our gallery, and one thing I noticed is that the first page of results initially shows as 1/n where n is 'total pages in the gallery' and not 'total pages of search results'. Moving forward to page 2 corrects this.

I've just gone to your site and don't see this - let me know the URL you are seeing this at.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
lornawebber
@lornawebber
6 years ago
334 posts
I've just tried this again and it is working as expected now.
Perhaps it was because I had only just applied your update, and tried it before clearing cache and running an integrity check and repair. Anyway, all good now.

Thanks for your help.

Tags