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 maephisto <my...@yahoo.com> on 2013/10/04 12:19:46 UTC

Updating a indexed vs a non-indexed field

In the last Solr versions Atomic Updates were introduced
http://wiki.apache.org/solr/Atomic_Updates

I'm wondering, updating a field that is 
stored="true" indexed="true" 
would be different as updating a field that is 
stored="true" indexed="false"

Would Solr try to reindex the doc only if the field is indexed and not if
it's just a stored field ?



--
View this message in context: http://lucene.472066.n3.nabble.com/Updating-a-indexed-vs-a-non-indexed-field-tp4093459.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Updating a indexed vs a non-indexed field

Posted by Shawn Heisey <so...@elyograg.org>.
On 10/4/2013 6:56 AM, maephisto wrote:
> My question is actually what's the difference in updating an indexed field
> vs. updating a non-indexed field? Will updating an indexed field trigger a
> "refresh" in the solr indexes while in the other case wouldn't?

A change is a change.  It doesn't matter whether the field is indexed or
not indexed when it comes to making a change.  That only matters at
query time, and only after the change becomes visible to queries.

Refresh isn't really a term that has meaning when you're talking about
Solr indexes.

When you index documents, whether it is a "standard" update or an atomic
update, nothing happens as far as change visibility until you commit
those changes using a commit that has openSearcher set to true.  When
that happens, any changes that have been made since the last commit with
openSearcher=true become visibile.

There's a whole separate discussion on hard commits and soft commits.
High-level summary that leaves out a TON of detail: hard commits are
about durability, soft commits are about visibility.

Thanks,
Shawn


Re: Updating a indexed vs a non-indexed field

Posted by maephisto <my...@yahoo.com>.
Thank you!

My question is actually what's the difference in updating an indexed field
vs. updating a non-indexed field? Will updating an indexed field trigger a
"refresh" in the solr indexes while in the other case wouldn't?



--
View this message in context: http://lucene.472066.n3.nabble.com/Updating-a-indexed-vs-a-non-indexed-field-tp4093459p4093480.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Updating a indexed vs a non-indexed field

Posted by Upayavira <uv...@odoko.co.uk>.
On Fri, Oct 4, 2013, at 11:19 AM, maephisto wrote:
> In the last Solr versions Atomic Updates were introduced
> http://wiki.apache.org/solr/Atomic_Updates
> 
> I'm wondering, updating a field that is 
> stored="true" indexed="true" 
> would be different as updating a field that is 
> stored="true" indexed="false"
> 
> Would Solr try to reindex the doc only if the field is indexed and not if
> it's just a stored field ?

Solr will use the stored fields along with the updates you provide to
produce a complete version of the document concerned.

If you don't store them, they can't be retrieved in this way, and your
field values will disappear.

Therefore, you need to store a field for it to survive an atomic update.
Whether you index it or not is up to you and the needs of your
application.

Upayavira