# Length tokenfilter may be solution

**URL:** <https://discuss.elastic.co/t/length-tokenfilter-may-be-solution/11957>\
**Category:** Elasticsearch\
**Created:** [May 14, 2013, 3:34pm UTC](https://discuss.elastic.co/t/length-tokenfilter-may-be-solution/11957 "2013-05-14T15:34:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![smhdiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smhdiu/32/1808_2.png) [@smhdiu](https://discuss.elastic.co/u/smhdiu)\
**Post date:** [May 14, 2013, 3:34pm UTC](https://discuss.elastic.co/t/length-tokenfilter-may-be-solution/11957/1 "2013-05-14T15:34:24Z")

</div>

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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [May 14, 2013, 4:58pm UTC](https://discuss.elastic.co/t/length-tokenfilter-may-be-solution/11957/2 "2013-05-14T16:58:58Z")

</div>

Hello Mohsin,

I would assume Script Filter is one of the options:

> **[Elastic — The Search AI Company](https://www.elastic.co)**
>
> Power insights and outcomes with The Elastic Search AI Platform. See into your data and find answers that matter with enterprise solutions designed to help you accelerate time to insight. Try Elastic ...

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

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Tue, May 14, 2013 at 6:34 PM, Mohsin Husen [smhdiu@gmail.com](mailto: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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [May 15, 2013, 4:17am UTC](https://discuss.elastic.co/t/length-tokenfilter-may-be-solution/11957/3 "2013-05-15T04:17:38Z")

</div>

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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![smhdiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smhdiu/32/1808_2.png) [@smhdiu](https://discuss.elastic.co/u/smhdiu)\
**Post date:** [May 15, 2013, 8:53am UTC](https://discuss.elastic.co/t/length-tokenfilter-may-be-solution/11957/4 "2013-05-15T08:53:48Z")

</div>

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 🙂

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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [May 15, 2013, 2:08pm UTC](https://discuss.elastic.co/t/length-tokenfilter-may-be-solution/11957/5 "2013-05-15T14:08:12Z")

</div>

3 Million? how long can it take? 10min? 😉

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 🙂
> 
> 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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:36am UTC](https://discuss.elastic.co/t/length-tokenfilter-may-be-solution/11957/6 "2017-07-06T02:36:31Z")

</div>

Closed on July 6, 2017, 2:36am UTC


