Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7725118B5 for ; Tue, 1 Jul 2014 00:54:47 +0000 (UTC) Received: (qmail 21277 invoked by uid 500); 1 Jul 2014 00:54:43 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 21199 invoked by uid 500); 1 Jul 2014 00:54:43 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 21188 invoked by uid 99); 1 Jul 2014 00:54:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2014 00:54:43 +0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=SPF_HELO_PASS,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of steve@b.abbies.us designates 162.243.111.211 as permitted sender) Received: from [162.243.111.211] (HELO b.abbies.us) (162.243.111.211) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2014 00:54:37 +0000 Received: from [10.0.0.33] (c-71-200-167-182.hsd1.md.comcast.net [71.200.167.182]) by b.abbies.us (Postfix) with ESMTPSA id 00696802F0 for ; Mon, 30 Jun 2014 20:54:14 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: Indexing non-stored fields From: Steve McKay In-Reply-To: Date: Mon, 30 Jun 2014 20:54:14 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <169BAC49-3052-4BA6-8C8B-529528FEA97A@b.abbies.us> References: <1404172349190-4144893.post@n3.nabble.com> <77b12e4ade99a2d1d27e7892218c3948.squirrel@admin.elyograg.org> To: solr-user@lucene.apache.org X-Mailer: Apple Mail (2.1878.2) X-Virus-Checked: Checked by ClamAV on apache.org Stored doesn't mean "stored to disk", more like "stored verbatim". When = you index a field, Solr analyzes the field value and makes it part of = the index. The index is persisted to disk when you commit, which is why = it sticks around after a restart. Searching the index, mapping from = search terms to doc ids, is very fast. However, the index is very very = bad at going in reverse, from doc ids to terms. That's where stored = fields come in. When you store a field, Solr takes the field value and = stores the entire value separate from the index. This makes it trivial = to get the value for a particular doc id, but it's terrible for = searching. So the stored attribute and the indexed attribute have different = purposes. Indexed means you want to be able to search on the value, and = stored means you want to be able to see the value in search results. On Jun 30, 2014, at 8:15 PM, tomasv wrote: > Thanks for the quick response. >=20 > Follow-up newbie question: > If the fields are not stored, how is the server able to search for = them > after a restart? Where does it get the data to be searched? >=20 > Example: "bob" (firstname) is indexed but not stored. After initial > indexing, I query for "firstname:(bob)" and I get my document back. = But if > I restart the server, where does the server go to retrieve information = that > will allow me to query for "bob" once again? It would seem that "bob" = got > stored someplace if I can query on it after a restart. >=20 > My untrained mind thinks that searching for "firstname:(bob)" (after a > restart) will fail, but that searching for "recordid:(12345)" (in my > original example) will succeed since it was indexed+stored. >=20 > (stored + indexed makes total sense to me; it's the indexed but NOT = stored > that I can't get my head around). >=20 > Thanks! >=20 >=20 >=20 > On Mon, Jun 30, 2014 at 5:05 PM, Shawn Heisey-4 [via Lucene] < > ml-node+s472066n4144894h24@n3.nabble.com> wrote: >=20 >>> Hello All, (warning: newbie question) >>>=20 >>> In our schema.xml we have defined many fields such as: >>> >>>=20 >>> Other fields are defined as this: >>> >>>=20 >>> Q: If my server is restarted/ rebooted, will I still be able to = search >> for >>> documents using the "firstname" field? Or will my records need to be >>> re-indexed before I can search by first name? >>> It seems that after a re-boot, I can search for the "stored=3D'true'" >> fields >>> but not the "stored=3D'false'" fields. >>>=20 >>> Am I interpreting this correctly? or am I missing something? >>=20 >> Fields that are not stored simply mean that they will not be returned = in >> search results. If they are indexed, then you will be able to search = on >> those fields. >>=20 >> This should be the case before or after a restart. >>=20 >> Thanks, >> Shawn >>=20 >>=20 >>=20 >>=20 >>=20 >> ------------------------------ >> If you reply to this email, your message will be added to the = discussion >> below: >>=20 >> = http://lucene.472066.n3.nabble.com/Indexing-non-stored-fields-tp4144893p41= 44894.html >> To unsubscribe from Indexing non-stored fields, click here >> = >> . >> NAML >> = >>=20 >=20 >=20 >=20 > --=20 > /*----------------------- > * Tomas at Home > * dadkind@gmail.com > * ---------------------*/ >=20 >=20 >=20 >=20 > -- > View this message in context: = http://lucene.472066.n3.nabble.com/Indexing-non-stored-fields-tp4144893p41= 44895.html > Sent from the Solr - User mailing list archive at Nabble.com.