Search and Ngram tokenizer


(Alexandre Heimburger) #1

Hi,

I'm using a ngram tokenizer to index my content (user's name). Search is
done in a suggestion box.

Example :

I search "gory" and I find "gregory faw", "gregory doe", and "John Gory".

Would it be possible to increase the score of John Gory since its lastname
matches the whole search term ?

The problem is that if I know that I want to select John Gory, and if there
are lot of gregory, he will never be suggested.

Thanks for your help

Alheim


(Shay Banon) #2

You can index the field twice using multi field mapping, once using ngram,
and once using something like the default standard analyzer, and then,
search on both fields, boosting the one that uses the standard analyzer.

On Wed, Mar 28, 2012 at 12:46 PM, Alexandre Heimburger <
alexheimburger@gmail.com> wrote:

Hi,

I'm using a ngram tokenizer to index my content (user's name). Search is
done in a suggestion box.

Example :

I search "gory" and I find "gregory faw", "gregory doe", and "John Gory".

Would it be possible to increase the score of John Gory since its lastname
matches the whole search term ?

The problem is that if I know that I want to select John Gory, and if
there are lot of gregory, he will never be suggested.

Thanks for your help

Alheim


(alheim) #3

awesome. Thx !

On Thu, Mar 29, 2012 at 2:02 PM, Shay Banon kimchy@gmail.com wrote:

You can index the field twice using multi field mapping, once using ngram,
and once using something like the default standard analyzer, and then,
search on both fields, boosting the one that uses the standard analyzer.

On Wed, Mar 28, 2012 at 12:46 PM, Alexandre Heimburger <
alexheimburger@gmail.com> wrote:

Hi,

I'm using a ngram tokenizer to index my content (user's name). Search is
done in a suggestion box.

Example :

I search "gory" and I find "gregory faw", "gregory doe", and "John Gory".

Would it be possible to increase the score of John Gory since its
lastname matches the whole search term ?

The problem is that if I know that I want to select John Gory, and if
there are lot of gregory, he will never be suggested.

Thanks for your help

Alheim

--
Alexandre Heimburger
VP Engineering
blueKiwi Software
tel : +33687880997
email : ahb@bluekiwi-software.com
adress : 93 rue Vieille du Temple, 75003 Paris

blueKiwi is the innovation leader in Enterprise Social Software. Our
solutions enable enterprises worldwide to engage and interact with their
internal and external social networks in multiple business domains.
blueKiwi has been consistently recognized by Gartner Inc. as a visionary
provider since 2007.


(Jamie Brough) #4

Alheim,

I just posted a very similar question - the following thread may be useful.
The mapping and query in the original post works perfectly for me:

http://elasticsearch-users.115913.n3.nabble.com/Question-about-multi-field-and-edge-ngram-td3800000.html

On Thursday, 29 March 2012 14:39:07 UTC+1, Alexandre Heimburger wrote:

awesome. Thx !

On Thu, Mar 29, 2012 at 2:02 PM, Shay Banon kimchy@gmail.com wrote:

You can index the field twice using multi field mapping, once using
ngram, and once using something like the default standard analyzer, and
then, search on both fields, boosting the one that uses the standard
analyzer.

On Wed, Mar 28, 2012 at 12:46 PM, Alexandre Heimburger <
alexheimburger@gmail.com> wrote:

Hi,

I'm using a ngram tokenizer to index my content (user's name). Search is
done in a suggestion box.

Example :

I search "gory" and I find "gregory faw", "gregory doe", and "John
Gory".

Would it be possible to increase the score of John Gory since its
lastname matches the whole search term ?

The problem is that if I know that I want to select John Gory, and if
there are lot of gregory, he will never be suggested.

Thanks for your help

Alheim

--
Alexandre Heimburger
VP Engineering
blueKiwi Software
tel : +33687880997
email : ahb@bluekiwi-software.com
adress : 93 rue Vieille du Temple, 75003 Paris


blueKiwi is the innovation leader in Enterprise Social Software. Our
solutions enable enterprises worldwide to engage and interact with their
internal and external social networks in multiple business domains.
blueKiwi has been consistently recognized by Gartner Inc. as a visionary
provider since 2007.


(system) #5