lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Document Created Date
Date Tue, 21 Apr 2015 15:45:08 GMT
Not really sure what you're asking here, I must be missing something.

The mapping is through the  field name supplied, so as long as your input
XML has something like
<add>
   <doc>
       <field name="CreatedDate">your date here</field>
   </doc>
</add>

it should be fine.

You can use "date math" here as well, as:
       <field name="CreatedDate">NOW</field>

Best,
Erick

On Tue, Apr 21, 2015 at 7:57 AM, Eric Meisler
<Eric.Meisler@veritablelp.com> wrote:
> I am a newbie and just started using Solr 4.10.3.  We have successfully indexed a network
drive and are running searches.  We now have a request to show the "Created Date" for all
documents (PDF/WORD/TXT/XLS) that come back in our search results.  I have successfully filtered
on the last_modified date but I cannot figure out or find out how to add a document's Created
Date to the schema.xml.  We do not want to search on the created date since last_modified
date handles this but just want to display it.  To my understanding I need to add indexed="false"
and stored="true" to the xml field but I don't know how or understand how the xml name will
map to the document's created date property.
>
> This is my guess:
> <field name="CreatedDate" type="date" indexed="false" stored="true"/>
>
> Can someone please supply the correct syntax for the xml and maybe a brief comment on
how solr maps to the actual document's property?  Also, will I need to re-index the dive to
make this change apply?
>
> Thanks,
>   Eric

Mime
View raw message