Single vs Plural

Submitted by JockMullin on Wed, 2009-02-04 09:02.Troubleshooting

I am currently evaluating dbSight and have it working very well; quite impressed with the product. Still running version 1.6 but will upgrade soon.

However having a problem in that singlular and plural forms are not considered equivalent. For example, if I search for pan I get x results, but if I search for pans I get far fewer results.

Is there an easy way to make the singular and plural forms equivalent, or do I have to add them all to synonyms.txt (a major undertaking).

Many thanks,
Jock

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Submitted by will on Wed, 2009-02-04 10:05.

The principle to choose an Analyzer:

 If the analyzed(tokenized) results are the same, they are considered the same.

For your case, you can configure the field to be Text(Text will be tokenized), and choose StandardEnglishAnalyzer, it'll be fine.

Submitted by marcv on Sat, 2009-03-21 06:55.

I set to english analayzer and re-analyzed. I am entering the term "tire" but it does not also find "tires". The field type is TEXT.

I see tires in some of the results but only in the ones that have the word "tire" in it and only "tire" is highlighted.

Also, is there a way to change highlighting color/format or optinally disable it easily?

thanks

Submitted by will on Sat, 2009-03-21 11:29.

Sorry, you need to use "Snowball-English" analyzer. You can test analyzers in the "Language" section. As long as "tires" and "tire" are analyzed into the same string, they are the same to DBSight.

Disabling highlighting is very easy. The scaffolding can generate rendering for a specific field as one of these two, usually in documents.ftl file:

 ${searchResult.highlight(doc,"field_name")}
 ${searchResult.directSummarize(doc,"field_name")}

You can directly render a field like:

 ${doc.get("field_name")}
Submitted by marcv on Mon, 2009-03-23 17:51.

I will change to snowball and try that.

Regarding above if I want to change the green highlight to yellow where can I find that setting/template? I did a search of all the files and was not able to locate that piece of code that sets the color.

thanks

marc

Submitted by will on Mon, 2009-03-23 18:44.

It's on the top of file main.ftl

 <@com.useHighlightTag '<span style="background-color:#00ff00">', '</span>' />
Submitted by JockMullin on Wed, 2009-02-04 12:30.

Hi, Will

Thanks very much for your quick response.
That has indeed helped - now when I enter ?q=cookie+cutter it also retrieved cookie cutters. However the opposite is not the case; if the query is cookie cutters, then only the plural is retrieved.

I guess that makes sense, in a way.

Brgds
Jock