keyword issues keyword issues
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

keyword issues

Started by Jason1975, June 15, 2012, 10:05:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jason1975

Hi guys

I have installed Coppermine and love it. I have however found a limitation that I am really hoping I can get around.

I am using the software as a coral identification database. So to find a specific coral a user would use various keywords.

So for example a certain corals keywords would be 'green inner disc' and 'white mouth'

The problem is that if I were to search for 'green inner disc' ever coral with the word green in ANY of the keywords comes up.

Is there a way to set up the keyword search so that it only finds the exact fields that you have specified?

Fingers crossed it can be done, and thanks in advance to anyone that can help out

Jason

Jason1975

Hi guys

No feedback or advice yet?

If it is not possible it would be great if someone could let me know as I am spending quite alot of time trying to find a solution.

Hopefully there is a workable solution to refine the search abilities.

Αndré

It's possible and I'm quite sure there's already a solution somewhere in our boards. You have to search for code changes in include/search.inc.php. Maybe that already helps.

Jason1975

Hi Andre

That search string and variations just bring up this thread. I have looked around as well but can't find anything.

Will try looking at the file you have mentioned.

Any other advice would be appreciated to make the search do what we need :)

Jason1975

Ah getting better results searching from the main forum page.

I will update if I find the solution....


Jason1975

Ok I have tried these 4 solutions

http://forum.coppermine-gallery.net/index.php/topic,34219.msg160066.html#msg160066

http://forum.coppermine-gallery.net/index.php/topic,65995.msg328784.html#msg328784

http://forum.coppermine-gallery.net/index.php/topic,30310.msg140285.html#msg140285

http://forum.coppermine-gallery.net/index.php/topic,65995.msg328784.html#msg328784

Some yield better results than others but none are working correctly yet. Just to test I used the search terms in the description as well as they keywords just to see if one worked better than the other.

I am not sure if spacing is possibly an issue

Here is another example:

4 Photos: one with keywords 'green mouth'
              one with keywords 'blue mouth'
              one with keywords 'green and blue mouth'
              one with keywords ' blue disc'

If I search for green mouth image 1,2 and 3 will show.

If I search for 'blue disc' image 2, 3 and 4 will show.

I would like to search for 'green and blue mouth' and not have the others some up in the search.

Tough problem but I will continue to test and research.

Αndré

Without having a look at those threads yet, I hope you selected Match all words (AND) as search type? If so, you should get the following results

  • green mouth: 1, 3
  • blue disc: 4


Awaiting your feedback.

Jason1975

Hi Andre

Thanks for taking the time to help me out with this problem.

I can confirm that I am using Match all words (AND) when I search

I have attached 2 screenshots to show you how a live search works.

In the first link I have searched for 'blue outer disc'. The first 2 images in the search are correct but the next 4 are incorrect as they are using 'blue inner disc'

In the second link I have searched for 'green outer disc'. Image 2, 3 and 4 are correct, but image 1 and 3 are being included in the search because of 'green short lash'

http://zoadatabase.com/search/coppermine1.JPG
http://zoadatabase.com/search/coppermine2.JPG

Hopefully that better explains what I am trying to achieve

Many thanks

Jason1975

Sorry meant to say

In the second link I have searched for 'green outer disc'. Image 2, 3 and 4 are correct, but image 1 and 5 are being included in the search because of 'green short lash'

Αndré

Unfortunately your screenshots doesn't really help. Please post a link to your gallery so I can perform some searches on my own. Depending on which fields you selected in the search form, the search results are correct. At least I can see all search terms in the search results of your screenshots. Maybe there's a comprehension issue how the search works or you simply asked the wrong question. It seems that you want to match the entire strings, and not the single terms. E.g. if you search for "blue outer disc" with the standard search feature it will also return pictures with titles/descriptions/keywords like "disc outer blue", "outer disc blue" or "blue foo outer bar disc".

Jason1975

Hi Andre

This is exactly the issue

I don't want the other searches to come up.

If I search for 'blue inner disc' I only want 'blue inner disc' to come up and not 'blue lash' or 'blue mouth'

The search must be specific and only show results of the exact term.

Thanks

Αndré

A picture with just the title 'blue lash' or 'blue mouth' won't come up if you search for 'blue inner disc'. You get that results because the other terms exists somewhere else in the pictures' meta data. This maybe could be avoided by adjusting the search parameters, that's why I asked for a link to your gallery.

Jason1975

Ah I understand.

There are just a few images in there but you should see what I mean

http://zoadatabase.com

Thanks

Αndré

The search works as expected. It finds just those pictures that match the search terms, regardless of their order. I'd suggest to use Coppermine's keyword feature and tag your images accordingly (use each line from the description as keyword).
If you want to modify the search function anyway, keep in mind that a search for "mouth blue" probably won't return anything, as the order is wrong (that's exactly what you're asking for).

Jason1975

Yeah I originally used the keywords but switched to the description to see if the search results would be better.

I tried again and unfortunately do not get the good results you do. Searching for 'green inner disc' brings up virtually every image I have as they all have 'green' somewhere in the description instead of just the image I want that has the actual key word 'green inner disc'

I think my next step is to get back to the include/search.inc.php file and see what I can find to make the search work how I need it to.

Thanks for the effort you put into trying to resolve the problem though, it is appreciated.

sharpo

Just had a look at the images and saw Joker Zoa, and other images with the word Zoa in the name.

Did a search on Joker Zoa (search set to match all words AND) and just 1 image was displayed.

Looks like it worked for me.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

Jason1975

Thanks for looking Sharpo, but searching for the names is not the problem.

The keywords are the problem.

Αndré

Have a look at the clickable keyword list below the search form, when using keywords. It works exactly as you want I think. However, adjusting the search function should be quite easy, but I've currently no spare time to create such a mod for you (it's weekend ;) ).

sharpo

Don't know if it will help you, but I have just experimented with a couple of empty albums in my test gallery. I gave one of them the keywords black engine, and the other green engine. Then I allocated the keywords black engine to a photo of a black engine, and green engine to a photo of a green engine.

Then when I look at the albums, the black engine is in the one album and the green engine in the other.

Could this be a way for you to group your images together, linking images to empty albums which are defined by keywords?

http://www.sharpo.co.uk/cpg15test/index.php

Look at the above & hopefully you will see what I have tried to explain
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25