I have been using 'pwg.images.search' from the API quite successfully.
The result of this search seems to be the 'OR' option (ie any term matches a photo)
Is there some flag I need to set to make it return an 'AND' option (ie all terms match any photo) or do I have to filter the returned records in order to find only matching 'AND' records.
Thanks
mcl
Offline
Hello
because of http://piwigo.org/dev/browser/trunk/inc … .php#L1278 and the AND like http://piwigo.org/dev/browser/trunk/inc … .php#L627, it will be always AND. According to the whole core it's better like that, so you will need to handle after
Offline
Hi There,
Many thanks for the links.
Unfortunately my PHP is not really good enough to fully understand, but I think I get your meaning.
I am using piwigo.com, so I can not do any low level mods, but I am trying to create my own front-end to the photos with the API, because I can not get any existing theme to work as I would like. My testing (early days) seems to indicate that the API gives a pretty speedy return of READ calls, so i shall continue to try this option.
I will just have to do some post processing to filter non 'AND' results. I am only interested in the Title and Comment fields, so it should not be too difficult.
Thanks again
mcl
Offline
this api uses the quick search method
it changed a bit in the current trunk version, but if you want to search for two terms A and B then use"+A +B" as a search term
Offline
Thanks for the reply.
However I format a Quicksearch query or pwg.images.search, I do not seem to be able to make it work in an AND way.
+a +b seems to find either A or B, but not both and I could be wrong about this, but I get the feeling once it gets a match in a TAG it does not search Title and Description.
"+a +b" finds nothing, which would seem correct as it will be looking for the text string in quotes.
+"a b" finds nothing
I have run out of ideas - any advice appreciated.
Thanks
mcl
Offline
a link ? plus some terms you're trying to search ?
Offline
Link: http://whatcaristhat.piwigo.com/
If you use 'corvette' and 'burton', an AND search will show 3 matches, as proved by using the AND option of SEARCH, but with Quicksearch I can not duplicate with combinations of + and the terms
These are matched by values in the Title and Comment Field, although there are matches for Corvette in tags as well.
Thanks for your help
mcl
Offline
Any thoughts as to how to get an `AND` query to work with either the API or Quicksearch in a standard theme ?
Thanks
Offline
Do I assume from the non-reply that the API Search and the QuickSearch do not work as an AND search.
If this should work in an AND way, is it going to be fixed and will it be documented as to how it can be used.
Disappointed
mcl
Offline