Michael, Your question is a little bit confusing. Business entities have attributes. We model entities as documents, and attributes as fields. That's why adding attributes to a filed is contradictory. Btw there few nearby conceptions in Lucene, which are Payloads and TermsPositions. About the problem itself I can suggest:
- http://wiki.apache.org/solr/Join - http://wiki.apache.org/solr/FieldCollapsing - it supports faceting - block join http://blog.mikemccandless.com/2012/01/searching-relational-content-with.html https://issues.apache.org/jira/browse/SOLR-3076 - patch only but really performant - http://wiki.apache.org/solr/SurroundQueryParser available in 4.0 can be used by the way proposed here http://goo.gl/R2bxc video http://vimeo.com/album/2012142/video/33817062 Have a good dive! On Mon, Dec 10, 2012 at 12:27 PM, Michael Jones <[email protected]>wrote: > Hi, > > I know that solr doesn't provide support for nested documents, but can I > add multiple attributes to a field? > > <add> > <document> > <field name="test" foo="one" bar ="two" index="true"> > > And specify an index on those attributes? > > I have a nested document that needs to be saved and searched. > > If the above can not be achieved what would be a suitable alternative? > > Would I have to do something like: > > <add> > <document> > <field name="test" foo="one" bar ="two"> > <field name="foo" index="true">one</field> > <field name="bar" index="true">two</field> > > And just return name="test" ? > > Thanks > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <[email protected]>
