lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shu-Wai Chow <sc...@alumni.rutgers.edu>
Subject Re: Using TimestampUpdateProcessorFactory and updateRequestProcessorChain
Date Wed, 18 Feb 2015 03:47:09 GMT
> if your goal is that *every* doc will get a last_modified, regarldess of 
> how it is indexed, then you don't need to set the "update.chain" default 
> on every requestHandler -- instead just mark your 
> updateRequestProcessorChain as the default...
> 
>       <updateRequestProcessorChain name="last_modified" default="true">
>         <processor class="solr.TimestampUpdateProcessorFactory">
>           <str name="fieldName">last_modified</str>
>         </processor>
> 	 …

Thanks for this.  There was some confusion between me and my coworker on which requestHandler
to set it, but setting it as a default should solve the problem.  Unfortunately, I’m still
not getting it back.  I’m now wondering if it’s the schema that I’m screwing up or how
I’m sending the index command.


Schema.xml:

> : <field name="last_modified" type="date" indexed="true" stored="true" />
> : <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0”/>

And the update command:

> : curl "http://localhost:8983/solr/update/extract?uprefix=attr_&fmap.content=body&literal.id=1234.id&last_modified=NOW"
-F "sc=@1234.txt"

--


> On Feb 17, 2015, at 10:26 AM, Chris Hostetter <hossman_lucene@fucit.org> wrote:
> 
> : Hi,
> : 
> : You are using "/update" when registering, but using "/update/extract" when invoking.
> : 
> : Ahmet
> 
> if your goal is that *every* doc will get a last_modified, regarldess of 
> how it is indexed, then you don't need to set the "update.chain" default 
> on every requestHandler -- instead just mark your 
> updateRequestProcessorChain as the default...
> 
>       <updateRequestProcessorChain name="last_modified" default="true">
>         <processor class="solr.TimestampUpdateProcessorFactory">
>           <str name="fieldName">last_modified</str>
>         </processor>
> 	 ...
> 
> : 
> : On Tuesday, February 17, 2015 6:28 PM, Shu-Wai Chow <schow@alumni.rutgers.edu>
wrote:
> : Hi, all.  I’m trying to insert a field into Solr called last_modified, which holds
a timestamp of the update. Since this is a cloud setup, I'm using the TimestampUpdateProcessorFactory
to update the updateRequestProcessorChain.
> : 
> : solrconfig.xml:
> : 
> : <requestHandler name="/update" class="solr.UpdateRequestHandler">
> :     <lst name="defaults">
> :         <str name="update.chain">last_modified</str>
> :     </lst>
> : </requestHandler>
> : 
> : <updateRequestProcessorChain name="last_modified">
> :     <processor class="solr.TimestampUpdateProcessorFactory">
> :         <str name="fieldName">last_modified</str>
> :     </processor>
> :     <processor class="solr.LogUpdateProcessorFactory" />
> :     <processor class="solr.RunUpdateProcessorFactory" />
> : </updateRequestProcessorChain>
> : 
> : 
> : In schema.xml, I have:
> : 
> : <field name="last_modified" type="date" indexed="true" stored="true" />
> : <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
> : This is the command I'm using to index:
> : 
> : curl "http://localhost:8983/solr/update/extract?uprefix=attr_&fmap.content=body&literal.id=1234.id&last_modified=NOW"
-F "sc=@1234.txt"
> : However, after indexing, the last_modified field is still not showing up on queries.
Is there something else I should be doing?  Thanks.
> : 
> 
> -Hoss
> http://www.lucidworks.com/


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message