Unexpected results with Low
Unexpected results with Low Search:
- I am using search_mode="all"
- I have one collection called photos (index rebuilt)
I only have a three records in the DB as I am working the functionality, but nevertheless these are my results / findings.
Searching for 'Holiday' I get three results back which is great because the images (using assets from P&T) have a keyword 'holiday' associated. The result is what I would expect.
However one of my photos has the keyword 'pots' it also has 'pots' in the title.
--
Performing a search like so 'Pots, Holiday' I would expect all results to be shown that have 'Holiday' and 'Pots'
I only get 'Pots' a single record is returned! Typing it in the search like: pots, holiday or even holiday, pots I get the same single record.
What am I missing?
--
{exp:low_search:form collection="photos" search_mode="all" result_page="photos/results" required="keywords"}
Keywords
Keywords
{if low_search_keywords_missing} Please enter keywords{/if}
Search
{/exp:low_search:form}
Any advice would be brilliant.
Trevor.
Replies
Low 16 Dec 2014 09:46
This could well be the result of only having 3 entries in the collection and the way MySQL full-text functions work.
If a certain term exists in more than 50% of the entries in the index, it is considered a common word, and will therefore be ignored by MySQL. So that might be causing the irregular search results. If you output the {low_search_score} and it is 0, then that would confirm it.
For now, I'd recommend adding more content to the site, and see if the issue persists.
Trevor Saint 16 Dec 2014 10:03
Hi Low. I will add more records and see how things work. Can you give me some sort of idea on the amount of entries I need to provide accurate results? I seem to be getting a 0.00 score for all image outputs.
Thanks for your reply.
Trevor Saint 16 Dec 2014 10:14
I will keep adding records and hopefully things will work out. Cheers
Low 16 Dec 2014 10:16
Not sure how many you'd need. But if you know "holiday", for example, would be a very common word, you can also try and add it to the list of Stopwords in the Settings. That will trigger the non-full-text fallback search. When triggered, it should give you a valid score.