You have to take off your DB hat when using Solr <G>...

There is no problem at all having documents in the
same index that are of different types. There is no
penalty for field definitions that aren't used. That is, you
can easily have two different types of documents in the
same index.

It's all about simply populating the two types of documents
with different fields. in your case, I suspect you'll have a
"type" field with two valid values, "project" and "contractor"
or some such. Then just attach a filter query depending on
what you want, i.e. &fq=type:project or &fq=type:contractor
and your searches will be restricted to the proper documents.

Best
Erick

On Thu, Apr 12, 2012 at 5:41 AM, tkoomzaaskz <tomasz.du...@gmail.com> wrote:
> Hi all,
>
> I'm a solr newbie, so sorry if I do anything wrong ;)
>
> I want to use SOLR not only for fast text search, but mainly to create a
> very fast search engine for a high-traffic system (MySQL would not do the
> job if the db grows too big).
>
> I need to store *two big structures* in SOLR: projects and contractors.
> Contractors will search for available projects and project owners will
> search for contractors who would do it for them.
>
> So far, I have found a solr tutorial for newbies
> http://www.solrtutorial.com, where I found the schema file which defines the
> data structure: http://www.solrtutorial.com/schema-xml.html. But my case is
> that *I want to have two structures*. I guess running two parallel solr
> instances is not the idea. I took a look at
> http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/schema.xml?view=markup
> and I can see that the schema goes like:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <schema name="example" version="1.5">
>  <types>
>    ...
>  </types>
>    <fields>
>      <field name="id" type="string" indexed="true" stored="true"
> required="true" />
>      <field name="sku" type="text_en_splitting_tight" indexed="true"
> stored="true" omitNorms="true"/>
>      <field name="name" type="text_general" indexed="true" stored="true"/>
>      <field name="alphaNameSort" type="alphaOnlySort" indexed="true"
> stored="false"/>
>      ...
>    </fields>
> </schema>
>
> But still, this is a single structure. And I need 2.
>
> Great thanks in advance for any help. There are not many tutorials for SOLR
> in the web.
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/two-structures-in-solr-tp3905143p3905143.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to