To help unravel your confusion, to put it simply, there are three distinct "values" for any field:

1. The "source" or "input" value - what you place in SolrXML or the raw value you "add" to a SolrInputDocument. 2. The "indexed" value that can be queried against. The source value is (optionally) analyzed and indexed. 3. The "stored" value that can be returned on a query (the "fl" parameter), which is an (optional) copy of the source value.

copyField uses the source/input value.

-- Jack Krupansky

-----Original Message----- From: Spadez
Sent: Tuesday, September 18, 2012 7:21 AM
To: solr-user@lucene.apache.org
Subject: Re: Taking a full text, then truncate and duplicate with stopwords

Ok, I’ve been doing a bit more research. In order to do the copyfield
technique, I need to store the original full text document within Solr, like
this:

<field name="truncated_description" indexed="false" stored="false">
<field name=&quot;keyword_description&quot; indexed=&quot;true&quot;
stored=&quot;&lt;b>true*">

What about instead if I imported the same fulltext into two seperate fields
for Solr by my Python script:

trucated_description=post.description,
keyword_description=post.description,

Doing it this way, I wouldnt need to store the fulltext in Solr, so I could
do this:
<field name=&quot;truncated_description&quot; indexed=&quot;false&quot;
stored=&quot;&lt;b>false*">
<field name=&quot;keyword_description&quot; indexed=&quot;true&quot;
stored=&quot;&lt;b>false*">

I'm still learning about this, but by importing it twice, I think remove the
need to ever store the uneccessary fulltext document in its original form
within Solr



--
View this message in context: http://lucene.472066.n3.nabble.com/Taking-a-full-text-then-truncate-and-duplicate-with-stopwords-tp4008269p4008580.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to