You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Amitha Talasila <Am...@mindtree.com> on 2007/09/21 08:51:27 UTC

Problem getting the FacetCount

Hi,

            We are facing a problem in getting the facet Count for a
particular query. We are getting the weight as 12m and it is indexed a string
field.

But when we make a facet query like,
http://localhost:8983/solr/select?q=ipod&rows=0&facet=true&facet.limit=-1&fac
et.query=weight:{0m TO 100m}, the facet count is coming as 0.We are indexing
it as a string field because if the user searches for 12m he needs to see
that result. Can anyone suggest a better way of querying this?   

 

Regards

Amitha



DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited.
E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Consulting Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside.
Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.
MindTree reserves the right to monitor and review the content of all messages sent to or from MindTree e-mail address. Messages sent to or from this e-mail address may be stored on the MindTree e-mail system or else where.

Re: Problem getting the FacetCount

Posted by Yonik Seeley <yo...@apache.org>.
On 9/21/07, Amitha Talasila <Am...@mindtree.com> wrote:
> But when we make a facet query like,
> http://localhost:8983/solr/select?q=ipod&rows=0&facet=true&facet.limit=-1&fac
> et.query=weight:{0m TO 100m}, the facet count is coming as 0.We are indexing
> it as a string field because if the user searches for 12m he needs to see
> that result. Can anyone suggest a better way of querying this?

In a string field, 12m is greater than 100m, so won't be in the range.
You need to index that field as a numeric type where range queries
work: use type sint or sfloat.

As for the "m", you should have a frontend that allows input in the
form desire and converts it to a valid query to solr.

-Yonik