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 Thomas Nguyen <th...@ign.com> on 2010/03/02 21:52:40 UTC

Unindexed Fields Are Searchable?

I've noticed that fields that I define as index="false" in the
schema.xml are still searchable.  Here's the definition of the field:

 

<field name="object_id" type="string" index="false" stored="true"
multiValued="false"/>

or

<field name="object_id" type="string" index="false" stored="false"
multiValued="false"/>

 

I can then add a new document with the field object_id=26 and have the
document returned when searching for "+object_Id=26".  On the other hand
if I add the document using the Lucene API the Solr search does not
return the document.  Is there a bug in Solr 1.4 that allows for
searchable unindexed fields for documents added by Solr? 


RE: Unindexed Fields Are Searchable?

Posted by Thomas Nguyen <th...@ign.com>.
Great catch!  Thanks for spotting my error :)

-----Original Message-----
From: Ahmet Arslan [mailto:iorixxx@yahoo.com] 
Sent: Tuesday, March 02, 2010 2:07 PM
To: solr-user@lucene.apache.org
Subject: Re: Unindexed Fields Are Searchable?


> Again, note that it should be
> index_ed_="false".  "ed" - very
> important!   If you're saying index="false",
> Solr is not reading that attribute at all, and going with
> the default for the field type.

Perfect catch :)


      


Re: Unindexed Fields Are Searchable?

Posted by Ahmet Arslan <io...@yahoo.com>.
> Again, note that it should be
> index_ed_="false".  "ed" - very
> important!   If you're saying index="false",
> Solr is not reading that attribute at all, and going with
> the default for the field type.

Perfect catch :)


      

Re: Unindexed Fields Are Searchable?

Posted by Erik Hatcher <er...@gmail.com>.
Again, note that it should be index_ed_="false".  "ed" - very  
important!   If you're saying index="false", Solr is not reading that  
attribute at all, and going with the default for the field type.

	Erik

On Mar 2, 2010, at 4:31 PM, Thomas Nguyen wrote:

> For testing purposes.  I just wanted to see if unindex fields in  
> documents added by Lucene API were searchable by Solr.  This is  
> after discovering that the unindexed fields in documents added by  
> Solr are searchable.
>
> -----Original Message-----
> From: Ahmet Arslan [mailto:iorixxx@yahoo.com]
> Sent: Tuesday, March 02, 2010 1:23 PM
> To: solr-user@lucene.apache.org
> Subject: RE: Unindexed Fields Are Searchable?
>
>> My schema has always had
>> index="false" for that field.  I only stopped and
>> restarted the servlet container when I added a document to
>> the index using the Lucene API instead of Solr.
>
> Is there a special reason/use-case for to add documents using Lucene  
> API?
>
>
>
>


RE: Unindexed Fields Are Searchable?

Posted by Thomas Nguyen <th...@ign.com>.
For testing purposes.  I just wanted to see if unindex fields in documents added by Lucene API were searchable by Solr.  This is after discovering that the unindexed fields in documents added by Solr are searchable.

-----Original Message-----
From: Ahmet Arslan [mailto:iorixxx@yahoo.com] 
Sent: Tuesday, March 02, 2010 1:23 PM
To: solr-user@lucene.apache.org
Subject: RE: Unindexed Fields Are Searchable?

> My schema has always had
> index="false" for that field.  I only stopped and
> restarted the servlet container when I added a document to
> the index using the Lucene API instead of Solr.

Is there a special reason/use-case for to add documents using Lucene API?


      


RE: Unindexed Fields Are Searchable?

Posted by Ahmet Arslan <io...@yahoo.com>.
> My schema has always had
> index="false" for that field.  I only stopped and
> restarted the servlet container when I added a document to
> the index using the Lucene API instead of Solr.

Is there a special reason/use-case for to add documents using Lucene API?


      

RE: Unindexed Fields Are Searchable?

Posted by Thomas Nguyen <th...@ign.com>.
My schema has always had index="false" for that field.  I only stopped and restarted the servlet container when I added a document to the index using the Lucene API instead of Solr.

-----Original Message-----
From: Ahmet Arslan [mailto:iorixxx@yahoo.com] 
Sent: Tuesday, March 02, 2010 1:01 PM
To: solr-user@lucene.apache.org
Subject: Re: Unindexed Fields Are Searchable?

> I've noticed that fields that I
> define as index="false" in the
> schema.xml are still searchable.  


indexed="false" defined fields are neither searchable nor sortable.

Did you re-start servlet container and re-index your documents after changing this attribute in schema.xml?


      


Re: Unindexed Fields Are Searchable?

Posted by Ahmet Arslan <io...@yahoo.com>.
> I've noticed that fields that I
> define as index="false" in the
> schema.xml are still searchable.  


indexed="false" defined fields are neither searchable nor sortable.

Did you re-start servlet container and re-index your documents after changing this attribute in schema.xml?