You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Brent <br...@gmail.com> on 2016/10/17 18:35:32 UTC

For TTL, does expirationFieldName need to be indexed?

In my solrconfig.xml, I have:

  <updateRequestProcessorChain default="true">
    <processor class="solr.processor.DocExpirationUpdateProcessorFactory">
      <int name="autoDeletePeriodSeconds">30</int>
      <str name="expirationFieldName">expire_at</str>
      <null name="ttlFieldName"/>
      <null name="ttlParamName"/>
    </processor>
  </updateRequestProcessorChain>

and in my schema, I have:

  <field name="expire_at" type="date" indexed="true" stored="true" 
multiValued="false"/>

If I change it to indexed="false", will it still work? If so, is there any
benefit to having the field indexed if I'm not using it in any way except to
allow the expiration processor to remove expired documents?



--
View this message in context: http://lucene.472066.n3.nabble.com/For-TTL-does-expirationFieldName-need-to-be-indexed-tp4301522.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: For TTL, does expirationFieldName need to be indexed?

Posted by Chetas Joshi <ch...@gmail.com>.
You just need to have indexed=true. It will use the inverted index to
delete the expired documents. You don't need stored=true as all the info
required by the DocExpirationUpdateProcessorFactory to delete a document is
there in the inverted index.

On Thu, Oct 20, 2016 at 4:26 PM, Brent <br...@gmail.com> wrote:

> Thanks for the reply.
>
> Follow up:
> Do I need to have the field stored? While I don't need to ever look at the
> field's original contents, I'm guessing that the
> DocExpirationUpdateProcessorFactory does, so that would mean I need to
> have
> stored=true as well, correct?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/For-TTL-does-expirationFieldName-need-to-
> be-indexed-tp4301522p4302386.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: For TTL, does expirationFieldName need to be indexed?

Posted by Brent <br...@gmail.com>.
Thanks for the reply.

Follow up:
Do I need to have the field stored? While I don't need to ever look at the
field's original contents, I'm guessing that the
DocExpirationUpdateProcessorFactory does, so that would mean I need to have
stored=true as well, correct? 



--
View this message in context: http://lucene.472066.n3.nabble.com/For-TTL-does-expirationFieldName-need-to-be-indexed-tp4301522p4302386.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: For TTL, does expirationFieldName need to be indexed?

Posted by Reth RM <re...@gmail.com>.
Yes, I think the field has to be indexed. If I understand correctly,
DocExpirationUpdateProcessorFactory uses this field as query field, so it
should be indexed=true.


On Mon, Oct 17, 2016 at 11:35 AM, Brent <br...@gmail.com> wrote:

> In my solrconfig.xml, I have:
>
>   <updateRequestProcessorChain default="true">
>     <processor class="solr.processor.DocExpirationUpdateProcessorFactory">
>       <int name="autoDeletePeriodSeconds">30</int>
>       <str name="expirationFieldName">expire_at</str>
>       <null name="ttlFieldName"/>
>       <null name="ttlParamName"/>
>     </processor>
>   </updateRequestProcessorChain>
>
> and in my schema, I have:
>
>   <field name="expire_at" type="date" indexed="true" stored="true"
> multiValued="false"/>
>
> If I change it to indexed="false", will it still work? If so, is there any
> benefit to having the field indexed if I'm not using it in any way except
> to
> allow the expiration processor to remove expired documents?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/For-TTL-does-expirationFieldName-need-to-
> be-indexed-tp4301522.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>