Re: two structures in solr
: 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. http://wiki.apache.org/solr/MultipleIndexes : that *I want to have two structures*. I guess running two parallel solr : instances is not the idea. I took a look at there's nothing wrong with it, the real question is wether you ever need to do things with both sets of documents at once. if contractors only ever search for projects, and project owners only ever serach for contractors, and no one ever searches for a mix of projects and contractors at the same time, then i would just suggest using multiple SolrCores... http://wiki.apache.org/solr/MultipleIndexes#MultiCore http://wiki.apache.org/solr/CoreAdmin -Hoss
Re: two structures in solr
bq: Is that right? I don't know, does it work ? You'll probably want an additional field for unique id (just named "id" in the example) that should be disjoint between your types. Best Erick On Fri, Apr 13, 2012 at 3:41 AM, tkoomzaaskz wrote: > Thank you very much Erick for your reply! > > So should it go something like the following: > > http://lucene.472066.n3.nabble.com/file/n3907393/solr_index.png > sorry for an ugly drawing ;) > > In this example, the index will have 13 columns: 6 for project, 6 for > contractor and one to define the type. Is that right? > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/two-structures-in-solr-tp3905143p3907393.html > Sent from the Solr - User mailing list archive at Nabble.com.
Re: two structures in solr
Thank you very much Erick for your reply! So should it go something like the following: http://lucene.472066.n3.nabble.com/file/n3907393/solr_index.png sorry for an ugly drawing ;) In this example, the index will have 13 columns: 6 for project, 6 for contractor and one to define the type. Is that right? -- View this message in context: http://lucene.472066.n3.nabble.com/two-structures-in-solr-tp3905143p3907393.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: two structures in solr
You have to take off your DB hat when using Solr ... 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 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: > > > > > ... > > > required="true" /> > stored="true" omitNorms="true"/> > > stored="false"/> > ... > > > > 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.