Re: Sub field indexing

2013-04-09 Thread It-forum

Thanks Toke,

Seems to be exactly what I try to do.

Regards

Eric

Le 08/04/2013 20:02, Toke Eskildsen a écrit :

It-forum [it-fo...@meseo.fr]:

In exemple I have a product A this product is compatible with a Product
B version 1, 5, 6.
How can I index values like :
compatible_engine : [productB,ProductZ]
version_compatible : [1,5,6],[45,85,96]

Index them as

compatible_engine: productB/1
compatible_engine: productB/5
compatible_engine: productB/6
compatible_engine: productZ/45
compatible_engine: productZ/85
compatible_engine: productZ/96

in a StrField (so that it is not tokenized).


After indexing how to search into ?

compatible_engine:productZ/85 to get all products compatible with productZ, 
version 85
compatible_engine:productZ* to get all products compatible with any version of 
productZ.

- Toke Eskildsen




Re: Sub field indexing

2013-04-09 Thread Toke Eskildsen
On Tue, 2013-04-09 at 08:40 +0200, It-forum wrote:
 Le 08/04/2013 20:02, Toke Eskildsen a écrit :
  compatible_engine:productZ/85 to get all products compatible with productZ, 
  version 85
  compatible_engine:productZ* to get all products compatible with any version 
  of productZ.

Whoops, slash triggers regexts, so you probably need to search for
compatible_engine:productZ/85
or
compatible_engine:productZ\/85

- Toke



Sub field indexing

2013-04-08 Thread It-forum

Hello All,

I'd like to be able to index documents containing criteria and values.

In exemple I have a product A this product is compatible with a Product 
B version 1, 5, 6.


My actual schema is like this :
Name
Price
reference
features
text

How can I index values like :

compatible_engine : [productB,ProductZ]
version_compatible : [1,5,6],[45,85,96]

After indexing how to search into ?

Best regards

Eric


Re: Sub field indexing

2013-04-08 Thread Upayavira
Solr does not support querying nested data structures. 

If at query time you know the product you want to check compatibility
for, you can use dynamic fields.

Thus, if you want to find products compatible with productB, you could
index:

id: productA
compatible_productB: 1, 5, 6
compatible_productZ: 45, 85, 96

Then you can search for: q=compatible_productB: 5

This will find you all documents that are compatible with productB
version 5.

Upayavira

On Mon, Apr 8, 2013, at 03:04 PM, It-forum wrote:
 Hello All,
 
 I'd like to be able to index documents containing criteria and values.
 
 In exemple I have a product A this product is compatible with a Product 
 B version 1, 5, 6.
 
 My actual schema is like this :
 Name
 Price
 reference
 features
 text
 
 How can I index values like :
 
 compatible_engine : [productB,ProductZ]
  version_compatible : [1,5,6],[45,85,96]
 
 After indexing how to search into ?
 
 Best regards
 
 Eric


RE: Sub field indexing

2013-04-08 Thread Toke Eskildsen
It-forum [it-fo...@meseo.fr]:
 In exemple I have a product A this product is compatible with a Product
 B version 1, 5, 6.

 How can I index values like :

 compatible_engine : [productB,ProductZ]
version_compatible : [1,5,6],[45,85,96]

Index them as

compatible_engine: productB/1
compatible_engine: productB/5
compatible_engine: productB/6
compatible_engine: productZ/45
compatible_engine: productZ/85
compatible_engine: productZ/96

in a StrField (so that it is not tokenized).

 After indexing how to search into ?

compatible_engine:productZ/85 to get all products compatible with productZ, 
version 85
compatible_engine:productZ* to get all products compatible with any version of 
productZ.

- Toke Eskildsen

Re: Sub field indexing

2013-04-08 Thread Chris Hostetter

: Subject: Sub field indexing
: References: 1365426517091-4054473.p...@n3.nabble.com
: In-Reply-To: 1365426517091-4054473.p...@n3.nabble.com

https://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists

When starting a new discussion on a mailing list, please do not reply to 
an existing message, instead start a fresh email.  Even if you change the 
subject line of your email, other mail headers still track which thread 
you replied to and your question is hidden in that thread and gets less 
attention.   It makes following discussions in the mailing list archives 
particularly difficult.



-Hoss