Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Word variations with multiple words - SearchUnit - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
DMacy
#1 Posted : Wednesday, January 7, 2015 12:40:11 PM
Rank: Advanced Member

Groups: Registered

Joined: 9/1/2010
Posts: 133
In handling word variations in the GetWordVariations action, is there a way to handle a variation that consists of multiple words? For example, in our data, the word "hymnbook" is sometimes spelled with one word and sometimes with two. Is there a way to define "hymn book" as a variation of "hymnbook" and vice versa?
Jim
#2 Posted : Wednesday, January 7, 2015 2:31:24 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Besides this http://keyoti.com/produc...ming%20And%20Lemmas.htm that you probably already know about, which can be used with single words

you can work with the QueryExpression directly, in codebehind for the search result page, you can access SearchResult1.QueryExpression and look for any words you want to modify. So for example you can take "hymnbook" and change it to "(hymnbook OR (hymn book))" - that is safe to do provided hymnbook is not in a phrase (ie inside quotes).

Jim


-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


DMacy
#3 Posted : Thursday, January 8, 2015 2:20:30 PM
Rank: Advanced Member

Groups: Registered

Joined: 9/1/2010
Posts: 133
Thanks! I'll check into the QueryExpression way of handling it.
DMacy
#4 Posted : Friday, January 9, 2015 12:05:20 PM
Rank: Advanced Member

Groups: Registered

Joined: 9/1/2010
Posts: 133
The QueryExpression property of my SearchResult object is null, before and after calling SearchAgent.Search. I am entering "hymnbook" as the search text. My search word shows up in SearchAgent.QueryString after calling SearchAgent.Search but not before. Is QueryExpression the property I should be modifying for multiple words?

BTW, the tooltip for the properties HighlightQueryWordsInSummary and HighlightQueryWordsInSummaryHTML contains "qords" that I think should be "words".
Jim
#5 Posted : Friday, January 9, 2015 12:51:04 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Thanks for the 'qords' headsup.

Are you using SearchAgent directly? If so, the query expression is one of the arguments to the SearchAgent.Search method, which you can modify in the same was as I described.

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


DMacy
#6 Posted : Friday, January 9, 2015 1:13:35 PM
Rank: Advanced Member

Groups: Registered

Joined: 9/1/2010
Posts: 133
Yes, I'm using the SearchAgent directly, and I missed the fact that the first argument is the query expression. I'll work with it there. Thanks!
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.