Does Solr automatically index all associated data fields?

43 views
Skip to first unread message

Robert Oschler

unread,
Jul 13, 2015, 9:55:48 AM7/13/15
to sol...@googlegroups.com
When I annotate various fields in a model with the SolrField attribute, are those fields automatically indexed by Solr/Lucene "behind the scenes"?  Or do I need to do an additional operation or add an additional attribute to the model's properties for those associated data fields I want to be indexed by Solr/Lucene?

Also, in my application I have one field that is the "big" description text field (max 200 chars) that will be the primary focus of all queries.  Do I need to add any special attributes or perform any additional SolrNet calls to tell Solr/Lucene that a specific model property is the primary search field, and that all other fields are simply fields used to help refine the search results?  I'm asking this in case I need to structure things in a way that provides the best performance for querying the "big" description text field over the other "support" fields.

Mauricio Scheffer

unread,
Jul 13, 2015, 5:48:25 PM7/13/15
to sol...@googlegroups.com
Properties annotated with [SolrField] are sent to Solr when you add the document in your .NET code.
You'll probably also want to configure text analysis for text fields, that's done in the Solr config and it's out of the scope of SolrNet. If you're new to text analysis, see https://cwiki.apache.org/confluence/display/solr/Field+Type+Definitions+and+Properties for some information.

Cheers





--
Mauricio

On Mon, Jul 13, 2015 at 2:55 PM, Robert Oschler <robert....@gmail.com> wrote:
When I annotate various fields in a model with the SolrField attribute, are those fields automatically indexed by Solr/Lucene "behind the scenes"?  Or do I need to do an additional operation or add an additional attribute to the model's properties for those associated data fields I want to be indexed by Solr/Lucene?

Also, in my application I have one field that is the "big" description text field (max 200 chars) that will be the primary focus of all queries.  Do I need to add any special attributes or perform any additional SolrNet calls to tell Solr/Lucene that a specific model property is the primary search field, and that all other fields are simply fields used to help refine the search results?  I'm asking this in case I need to structure things in a way that provides the best performance for querying the "big" description text field over the other "support" fields.

--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrnet+u...@googlegroups.com.
To post to this group, send email to sol...@googlegroups.com.
Visit this group at http://groups.google.com/group/solrnet.
For more options, visit https://groups.google.com/d/optout.

Robert Oschler

unread,
Jul 13, 2015, 6:28:46 PM7/13/15
to sol...@googlegroups.com
Hello Mauricio,

A big group thanks for all your replies on this and the other threads.

As far as the schema/text analysis is concerned, is there anything special I need to do to support fuzzy queries? (E.g. - "dogs~").  I just want to make sure I don't leave out any steps necessary to facilitate fuzzy queries, especially those necessary to make searches fast.

--
You received this message because you are subscribed to a topic in the Google Groups "SolrNet" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/solrnet/o92ZfWKoUNo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to solrnet+u...@googlegroups.com.

To post to this group, send email to sol...@googlegroups.com.
Visit this group at http://groups.google.com/group/solrnet.
For more options, visit https://groups.google.com/d/optout.

Mauricio Scheffer

unread,
Jul 13, 2015, 6:37:20 PM7/13/15
to sol...@googlegroups.com
For fuzzy search you'll probably want a standard tokenizer with no language analysis filter. See http://stackoverflow.com/questions/9883151/solr-fuzzy-search-for-similar-words for more details.

If you need more information about Solr text analysis please use the Solr mailing list: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/

Cheers




--
Mauricio
Reply all
Reply to author
Forward
0 new messages