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
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.
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.
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 :)
Ah getting better results searching from the main forum page.
I will update if I find the solution....
Andre is this the post you were talking about?
http://forum.coppermine-gallery.net/index.php/topic,65995.msg328784.html#msg328784
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.
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.
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/coppermine1.JPG)
http://zoadatabase.com/search/coppermine2.JPG (http://zoadatabase.com/search/coppermine2.JPG)
Hopefully that better explains what I am trying to achieve
Many thanks
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'
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".
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
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.
Ah I understand.
There are just a few images in there but you should see what I mean
http://zoadatabase.com (http://zoadatabase.com)
Thanks
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).
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.
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.
Thanks for looking Sharpo, but searching for the names is not the problem.
The keywords are the problem.
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 ;) ).
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
Hi Sharpo
Thank you for trying to help me.
I have checked your forum and those are the results I am trying to achieve.
Could you please add 2 more albums with keywords black chimney and one with green chimney.
The way my gallery is working is that if you were to search green engine, the green chimney image will also come up and the same with the black chimney.
Have you edited your include/search.inc.php file or is it the standard file you are using?
Thanks again
Have added 2 more albums with key word black chimney for one & green chimney for other. Then added black chimney keywords to one photo & green chimney to another. Each of the 4 albums only has 1 photo in.
Sorry, forgot to add, just the standard file I am using - not clever enough to make many alterations!
http://www.sharpo.co.uk/cpg15test/index.php
The albums will be seen from the above link
Sharpo yours is still working perfectly and exactly how I would want it to.
For the final test may I ask you to please add the following key words.
Test black engine - 'green mouth'
Test green engine - 'green inner disc'
Test black chimney - 'green outer disc'
Test green chimney - 'green lash'
Using these words will replicate part of what I am trying to do.
Thank you so much for helping out :)
Quote from: Jason1975 on June 24, 2012, 01:53:06 PM
Sharpo yours is still working perfectly and exactly how I would want it to.
For the final test may I ask you to please add the following key words.
Test black engine - 'green mouth'
Test green engine - 'green inner disc'
Test black chimney - 'green outer disc'
Test green chimney - 'green lash'
Using these words will replicate part of what I am trying to do.
Thank you so much for helping out :)
Done as you requested, added the keywords, the photos still only appear in one of those 4 folders,
Sharpo, yours works absolutely perfectly.
Thanks for adding the keywords so I could test it.
I will investigate if there are any folder structure differences and possibly re install from scratch.
You help has shown me that the search can work like I need it to so many thanks.
You're welcome. Glad I could help.
Please don't mix up the search feature with the (album) keyword feature.
However, to make the search work as you asked for, open include/search.inc.php, find
$words = explode(' ', $string);
and replace with
$words = array($string);
Hi Andre.
That change seems to have solved the problems. The search is now working perfectly.
Thank you for the help :)
Please
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
if you consider the thread as solved.