Or is there a way to achieve this using EDismax query parser ?
> From: pragyans...@outlook.com > To: solr-user@lucene.apache.org > Subject: RE: Search over dynamic fields > Date: Wed, 13 Feb 2013 19:09:24 +0530 > > Formatted the mail again. > Hi, > I have two dynamic fields like "Product-Name-*" and "Product-Rating-*".One > document can contain 5 products and respective ratings like below. > <str name="Product-Name-0">HTC Wildfire S</str><str > name="Product-Name-1">Samsung Tab 2</str><str name="Product-Name-2">Samsung > Note</str><str name="Product-Name-3">IPhone5</str><str > name="Product-Name-4">Nokia Lumia 720</str><int > name="Product-Rating-0">5</int><int name="Product-Rating-1">9</int><int > name="Product-Rating-2">7</int><int name="Product-Rating-3">9</int><int > name="Product-Rating-4">9</int> > In my current scnario, I have to boost the products which has a higher > rating(Only More then 6.Note-Rating will be between 1 to 10).If i want to > search for a perticular product name for example "IPhone5",then i am quering > like this > (Product-Name-0:IPhone5 AND (Product-Rating-0:7^3 OR Product-Rating-0:8^4 OR > Product-Rating-0:9^5 OR Product-Rating-0:10^6)) OR (Product-Name-1:IPhone5 > AND (Product-Rating-1:7^3 OR Product-Rating-1:8^4 OR Product-Rating-1:9^5 OR > Product-Rating-1:10^6)) OR(Product-Name-2:IPhone5 AND (Product-Rating-2:7^3 > OR Product-Rating-2:8^4 OR Product-Rating-2:9^5 OR Product-Rating-2:10^6)) > OR(Product-Name-3:IPhone5 AND (Product-Rating-3:7^3 OR Product-Rating-3:8^4 > OR Product-Rating-3:9^5 OR Product-Rating-3:10^6)) OR(Product-Name-4:IPhone5 > AND (Product-Rating-4:7^3 OR Product-Rating-4:8^4 OR Product-Rating-4:9^5 OR > Product-Rating-4:10^6)) > I could have used Product-Name-*:IPhone5 to find all the documents but > problem is i dont know how to boost that product according to its respective > Product Rating . > Can anybody guide me wheather i am following the right approach or not ? > Or Is there any other approach to achieve this ? > > Thanks,-Pragyanshis