Length tokenfilter may be solution

Hello,

Suppose i have Book Index with Id and Name.

Is it possible to get all the books whose name length is greater than 15 ?

Mohsin

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hello Mohsin,

I would assume Script Filter is one of the options:
http://www.elasticsearch.org/guide/reference/query-dsl/script-filter/

There might be others, but I can't find one now.

Best regards,
Radu

http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Tue, May 14, 2013 at 6:34 PM, Mohsin Husen smhdiu@gmail.com wrote:

Hello,

Suppose i have Book Index with Id and Name.

Is it possible to get all the books whose name length is greater than 15 ?

Mohsin

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

why don't you just add the length of the title to the document and filter
on it?

simon

On Tuesday, May 14, 2013 5:34:24 PM UTC+2, Mohsin Husen wrote:

Hello,

Suppose i have Book Index with Id and Name.

Is it possible to get all the books whose name length is greater than 15 ?

Mohsin

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks @radu, yes script filter may help out.. let me try out..

@simonw yes i thought to do that but i have already index 3 million doc and
don't want to reindex everything again.

but good option though.

Thanks :slight_smile:

On Wednesday, 15 May 2013 05:17:38 UTC+1, simonw wrote:

why don't you just add the length of the title to the document and filter
on it?

simon

On Tuesday, May 14, 2013 5:34:24 PM UTC+2, Mohsin Husen wrote:

Hello,

Suppose i have Book Index with Id and Name.

Is it possible to get all the books whose name length is greater than 15 ?

Mohsin

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

3 Million? how long can it take? 10min? :wink:

simon

On Wednesday, May 15, 2013 10:53:48 AM UTC+2, Mohsin Husen wrote:

Thanks @radu, yes script filter may help out.. let me try out..

@simonw yes i thought to do that but i have already index 3 million doc
and don't want to reindex everything again.

but good option though.

Thanks :slight_smile:

On Wednesday, 15 May 2013 05:17:38 UTC+1, simonw wrote:

why don't you just add the length of the title to the document and filter
on it?

simon

On Tuesday, May 14, 2013 5:34:24 PM UTC+2, Mohsin Husen wrote:

Hello,

Suppose i have Book Index with Id and Name.

Is it possible to get all the books whose name length is greater than 15
?

Mohsin

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.