Search with white space

I'm working on a super fast completion engine using ES.

I'm using a wildcard term so everything is OK when I type one term.

But if I start typing a sentence (like the title of the conversation I
want to read), the query does not return anything.

I've read that I should mark the searched field as "not_analyzed" but
I don't figure out how to do that.

thx

Hi,

Check the "index":"not_analyzed" attribute/value in mappings, for example
here: Elasticsearch Platform — Find real-time answers at scale | Elastic
May be you should also consider using prefix query:
Elasticsearch Platform — Find real-time answers at scale | Elastic

http://www.elasticsearch.org/guide/reference/query-dsl/prefix-query.html
Regards,
Lukas

On Fri, Feb 25, 2011 at 10:58 AM, alheim alexheimburger@gmail.com wrote:

I'm working on a super fast completion engine using ES.

I'm using a wildcard term so everything is OK when I type one term.

But if I start typing a sentence (like the title of the conversation I
want to read), the query does not return anything.

I've read that I should mark the searched field as "not_analyzed" but
I don't figure out how to do that.

thx

I tried to use "index":"not_analyzed". Not better.

Imagine that I want to index a document with a title "I want to become a ES
expert"

If I search "I want" , there should be a hit.
If I search "beco", there should be a hit
and If I search "a ES expert", there should be a hit.

How do I need to configure the field ?

thanks for your help.

On Fri, Feb 25, 2011 at 2:01 PM, Lukáš Vlček lukas.vlcek@gmail.com wrote:

Hi,

Check the "index":"not_analyzed" attribute/value in mappings, for example
here: Elasticsearch Platform — Find real-time answers at scale | Elastic
May be you should also consider using prefix query:
Elasticsearch Platform — Find real-time answers at scale | Elastic

http://www.elasticsearch.org/guide/reference/query-dsl/prefix-query.html
Regards,
Lukas

On Fri, Feb 25, 2011 at 10:58 AM, alheim alexheimburger@gmail.com wrote:

I'm working on a super fast completion engine using ES.

I'm using a wildcard term so everything is OK when I type one term.

But if I start typing a sentence (like the title of the conversation I
want to read), the query does not return anything.

I've read that I should mark the searched field as "not_analyzed" but
I don't figure out how to do that.

thx

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

What is blueKiwi? blueKiwi - the first Enterprise Social Software Suite in
the world building professional networks on conversations and relationships

  • helps large organizations increase their productivity, foster innovations
    and boost people satisfaction.

Thx for help.

I followed these steps :

Into config/elasticsearch.yml, add a custom analyzer

index:
analysis :
analyzer :
lowercase_keyword :
type : custom
filter : [lowercase]
tokenizer : keyword

Call the URL :

curl -XPUT 'http://localhost:9200/devalex10/post/_mapping' -d '
{
"post" : {
"properties" : {
"title" : {"type":"string",
"analyzer":"lowercase_keyword"}
}
}
}

IMPORTANT : if the index already exist, one should get an error saying
that there is a merge conflict. Do not attempt to use the ignore_merge
parameter which will just ignore the new analyzer. The solution is to
scratch the index et index again.

Any other idea ?

On 25 fév, 14:01, Lukáš Vlček lukas.vl...@gmail.com wrote:

Hi,

Check the "index":"not_analyzed" attribute/value in mappings, for example
here:Elasticsearch Platform — Find real-time answers at scale | Elastic
May be you should also consider using prefix query:Elasticsearch Platform — Find real-time answers at scale | Elastic

http://www.elasticsearch.org/guide/reference/query-dsl/prefix-query.html
Regards,
Lukas

On Fri, Feb 25, 2011 at 10:58 AM, alheim alexheimbur...@gmail.com wrote:

I'm working on a super fast completion engine using ES.

I'm using a wildcard term so everything is OK when I type one term.

But if I start typing a sentence (like the title of the conversation I
want to read), the query does not return anything.

I've read that I should mark the searched field as "not_analyzed" but
I don't figure out how to do that.

thx

You can do a combination of several options. For example, use a multi field mapping that have it both not analyzed, analyzed once with ngrams, and another option to analyze it with shingles (Elasticsearch Platform — Find real-time answers at scale | Elastic).

Then, you can query those fields in a single search request, either using several queries, or using a query string that runs against those.
On Friday, February 25, 2011 at 3:34 PM, Alexandre Heimburger wrote:

I tried to use "index":"not_analyzed". Not better.

Imagine that I want to index a document with a title "I want to become a ES expert"

If I search "I want" , there should be a hit.
If I search "beco", there should be a hit
and If I search "a ES expert", there should be a hit.

How do I need to configure the field ?

thanks for your help.

On Fri, Feb 25, 2011 at 2:01 PM, Lukáš Vlček lukas.vlcek@gmail.com wrote:

Hi,

Check the "index":"not_analyzed" attribute/value in mappings, for example here: Elasticsearch Platform — Find real-time answers at scale | Elastic
May be you should also consider using prefix query: Elasticsearch Platform — Find real-time answers at scale | Elastic

Regards,
Lukas

On Fri, Feb 25, 2011 at 10:58 AM, alheim alexheimburger@gmail.com wrote:

I'm working on a super fast completion engine using ES.

I'm using a wildcard term so everything is OK when I type one term.

But if I start typing a sentence (like the title of the conversation I
want to read), the query does not return anything.

I've read that I should mark the searched field as "not_analyzed" but
I don't figure out how to do that.

thx

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

What is blueKiwi? blueKiwi - the first Enterprise Social Software Suite in the world building professional networks on conversations and relationships - helps large organizations increase their productivity, foster innovations and boost people satisfaction.

ok. does that mean that the text will be indexed 2 times ?

On Sat, Feb 26, 2011 at 9:38 PM, Shay Banon shay.banon@elasticsearch.comwrote:

You can do a combination of several options. For example, use a multi
field mapping that have it both not analyzed, analyzed once with ngrams, and
another option to analyze it with shingles (
Elasticsearch Platform — Find real-time answers at scale | Elastic
).

Then, you can query those fields in a single search request, either using
several queries, or using a query string that runs against those.

On Friday, February 25, 2011 at 3:34 PM, Alexandre Heimburger wrote:

I tried to use "index":"not_analyzed". Not better.

Imagine that I want to index a document with a title "I want to become a ES
expert"

If I search "I want" , there should be a hit.
If I search "beco", there should be a hit
and If I search "a ES expert", there should be a hit.

How do I need to configure the field ?

thanks for your help.

On Fri, Feb 25, 2011 at 2:01 PM, Lukáš Vlček lukas.vlcek@gmail.comwrote:

Hi,

Check the "index":"not_analyzed" attribute/value in mappings, for example
here: Elasticsearch Platform — Find real-time answers at scale | Elastic
May be you should also consider using prefix query:
Elasticsearch Platform — Find real-time answers at scale | Elastic

http://www.elasticsearch.org/guide/reference/query-dsl/prefix-query.html
Regards,
Lukas

On Fri, Feb 25, 2011 at 10:58 AM, alheim alexheimburger@gmail.com wrote:

I'm working on a super fast completion engine using ES.

I'm using a wildcard term so everything is OK when I type one term.

But if I start typing a sentence (like the title of the conversation I
want to read), the query does not return anything.

I've read that I should mark the searched field as "not_analyzed" but
I don't figure out how to do that.

thx

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

What is blueKiwi? blueKiwi - the first Enterprise Social Software Suite in
the world building professional networks on conversations and relationships

  • helps large organizations increase their productivity, foster innovations
    and boost people satisfaction.

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

What is blueKiwi? blueKiwi - the first Enterprise Social Software Suite in
the world building professional networks on conversations and relationships

  • helps large organizations increase their productivity, foster innovations
    and boost people satisfaction.

Yes, it will be indexed several times with different "term" combinations.
On Monday, February 28, 2011 at 9:27 AM, Alexandre Heimburger wrote:

ok. does that mean that the text will be indexed 2 times ?

On Sat, Feb 26, 2011 at 9:38 PM, Shay Banon shay.banon@elasticsearch.com wrote:

You can do a combination of several options. For example, use a multi field mapping that have it both not analyzed, analyzed once with ngrams, and another option to analyze it with shingles (Elasticsearch Platform — Find real-time answers at scale | Elastic).

Then, you can query those fields in a single search request, either using several queries, or using a query string that runs against those.
On Friday, February 25, 2011 at 3:34 PM, Alexandre Heimburger wrote:

I tried to use "index":"not_analyzed". Not better.

Imagine that I want to index a document with a title "I want to become a ES expert"

If I search "I want" , there should be a hit.
If I search "beco", there should be a hit
and If I search "a ES expert", there should be a hit.

How do I need to configure the field ?

thanks for your help.

On Fri, Feb 25, 2011 at 2:01 PM, Lukáš Vlček lukas.vlcek@gmail.com wrote:

Hi,

Check the "index":"not_analyzed" attribute/value in mappings, for example here: Elasticsearch Platform — Find real-time answers at scale | Elastic
May be you should also consider using prefix query: Elasticsearch Platform — Find real-time answers at scale | Elastic

Regards,
Lukas

On Fri, Feb 25, 2011 at 10:58 AM, alheim alexheimburger@gmail.com wrote:

I'm working on a super fast completion engine using ES.

I'm using a wildcard term so everything is OK when I type one term.

But if I start typing a sentence (like the title of the conversation I
want to read), the query does not return anything.

I've read that I should mark the searched field as "not_analyzed" but
I don't figure out how to do that.

thx

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

What is blueKiwi? blueKiwi - the first Enterprise Social Software Suite in the world building professional networks on conversations and relationships - helps large organizations increase their productivity, foster innovations and boost people satisfaction.

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

What is blueKiwi? blueKiwi - the first Enterprise Social Software Suite in the world building professional networks on conversations and relationships - helps large organizations increase their productivity, foster innovations and boost people satisfaction.