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 Vijaya Narayana Reddy Bhoomi Reddy <vi...@whishworks.com> on 2015/04/20 17:30:39 UTC

Search in Solr Index

Hi,

I am indexing some data from a Database. Data is getting indexed properly
and when I query in the Solr stock UI with query parameters as *.*, I could
see the documents with all the fields listed and as well the numFound
reflecting properly. However,  if I perform a query with a simple string
 for example "Birmingham", numFound returns 0 with no records to be
displayed. There are records which are indexed that contains fields with
the text "Birmingham". In the schema.xml, all the fields have been defined
as indexed="true" and stored="true"

This is happening for any search query string. What could be the reason for
this behavior?


Thanks & Regards
Vijay

-- 
The contents of this e-mail are confidential and for the exclusive use of 
the intended recipient. If you receive this e-mail in error please delete 
it from your system immediately and notify us either by e-mail or 
telephone. You should not copy, forward or otherwise disclose the content 
of the e-mail. The views expressed in this communication may not 
necessarily be the view held by WHISHWORKS.

Re: Search in Solr Index

Posted by Vijaya Narayana Reddy Bhoomi Reddy <vi...@whishworks.com>.
To add further, initially when I give *.*, numfound returns 14170. After
giving a search string, numFound returns 0. Now if I change the search
string again back to *.*, numFound still returns to 0.

I have to refresh the page completely to see 14170 again when *.* is given
as the search string.

Thanks & Regards
Vijay



On 20 April 2015 at 16:30, Vijaya Narayana Reddy Bhoomi Reddy <
vijaya.bhoomireddy@whishworks.com> wrote:

> Hi,
>
> I am indexing some data from a Database. Data is getting indexed properly
> and when I query in the Solr stock UI with query parameters as *.*, I could
> see the documents with all the fields listed and as well the numFound
> reflecting properly. However,  if I perform a query with a simple string
>  for example "Birmingham", numFound returns 0 with no records to be
> displayed. There are records which are indexed that contains fields with
> the text "Birmingham". In the schema.xml, all the fields have been defined
> as indexed="true" and stored="true"
>
> This is happening for any search query string. What could be the reason
> for this behavior?
>
>
> Thanks & Regards
> Vijay
>
>

-- 
The contents of this e-mail are confidential and for the exclusive use of 
the intended recipient. If you receive this e-mail in error please delete 
it from your system immediately and notify us either by e-mail or 
telephone. You should not copy, forward or otherwise disclose the content 
of the e-mail. The views expressed in this communication may not 
necessarily be the view held by WHISHWORKS.

Re: Search in Solr Index

Posted by Vijaya Narayana Reddy Bhoomi Reddy <vi...@whishworks.com>.
Thanks Matt and Yavar for the suggestion.

Now I have fixed the issue.

For others benefit, the issue was with defining the fields as String. Now I
changed them to text_general. Also, instead of indexing these individual
fields, I created corresponding copyFields for each of them, where dest
field is set to text.

This fixed the issue.

Thanks for your help!!


Thanks & Regards
Vijay


On 20 April 2015 at 17:11, Yavar Husain <ya...@gmail.com> wrote:

> There might be issues with your default search field. Suppose if you are
> searching field named "MyTestField" then give your query as
> MyTestField:Birmingham
> and see if you get any results. As Matt suggested there might be some
> issues with the way you have done tokenization/analysis etc.
>
>
>
> On Mon, Apr 20, 2015 at 9:21 PM, Matt Kuiper <ma...@issinc.com>
> wrote:
>
> > What type of field are you using? String?  If so try another type, like
> > text_general.
> >
> > I believe with type String the contents are stored in the index exactly
> as
> > they are inputted into the index.  So a search hit will have to match
> > exactly the full value of the field, I assume in your case "Birmingham"
> is
> > only part of the value.  With text_general and other types, the value
> will
> > be tokenized and allow for hits on parts or variants of the value.
> >
> > Matt
> >
> >
> > -----Original Message-----
> > From: Vijaya Narayana Reddy Bhoomi Reddy [mailto:
> > vijaya.bhoomireddy@whishworks.com]
> > Sent: Monday, April 20, 2015 9:31 AM
> > To: solr-user@lucene.apache.org
> > Subject: Search in Solr Index
> >
> > Hi,
> >
> > I am indexing some data from a Database. Data is getting indexed properly
> > and when I query in the Solr stock UI with query parameters as *.*, I
> could
> > see the documents with all the fields listed and as well the numFound
> > reflecting properly. However,  if I perform a query with a simple string
> > for example "Birmingham", numFound returns 0 with no records to be
> > displayed. There are records which are indexed that contains fields with
> > the text "Birmingham". In the schema.xml, all the fields have been
> defined
> > as indexed="true" and stored="true"
> >
> > This is happening for any search query string. What could be the reason
> > for this behavior?
> >
> >
> > Thanks & Regards
> > Vijay
> >
> > --
> > The contents of this e-mail are confidential and for the exclusive use of
> > the intended recipient. If you receive this e-mail in error please delete
> > it from your system immediately and notify us either by e-mail or
> > telephone. You should not copy, forward or otherwise disclose the content
> > of the e-mail. The views expressed in this communication may not
> > necessarily be the view held by WHISHWORKS.
> >
>

-- 
The contents of this e-mail are confidential and for the exclusive use of 
the intended recipient. If you receive this e-mail in error please delete 
it from your system immediately and notify us either by e-mail or 
telephone. You should not copy, forward or otherwise disclose the content 
of the e-mail. The views expressed in this communication may not 
necessarily be the view held by WHISHWORKS.

Re: Search in Solr Index

Posted by Yavar Husain <ya...@gmail.com>.
There might be issues with your default search field. Suppose if you are
searching field named "MyTestField" then give your query as
MyTestField:Birmingham
and see if you get any results. As Matt suggested there might be some
issues with the way you have done tokenization/analysis etc.



On Mon, Apr 20, 2015 at 9:21 PM, Matt Kuiper <ma...@issinc.com> wrote:

> What type of field are you using? String?  If so try another type, like
> text_general.
>
> I believe with type String the contents are stored in the index exactly as
> they are inputted into the index.  So a search hit will have to match
> exactly the full value of the field, I assume in your case "Birmingham" is
> only part of the value.  With text_general and other types, the value will
> be tokenized and allow for hits on parts or variants of the value.
>
> Matt
>
>
> -----Original Message-----
> From: Vijaya Narayana Reddy Bhoomi Reddy [mailto:
> vijaya.bhoomireddy@whishworks.com]
> Sent: Monday, April 20, 2015 9:31 AM
> To: solr-user@lucene.apache.org
> Subject: Search in Solr Index
>
> Hi,
>
> I am indexing some data from a Database. Data is getting indexed properly
> and when I query in the Solr stock UI with query parameters as *.*, I could
> see the documents with all the fields listed and as well the numFound
> reflecting properly. However,  if I perform a query with a simple string
> for example "Birmingham", numFound returns 0 with no records to be
> displayed. There are records which are indexed that contains fields with
> the text "Birmingham". In the schema.xml, all the fields have been defined
> as indexed="true" and stored="true"
>
> This is happening for any search query string. What could be the reason
> for this behavior?
>
>
> Thanks & Regards
> Vijay
>
> --
> The contents of this e-mail are confidential and for the exclusive use of
> the intended recipient. If you receive this e-mail in error please delete
> it from your system immediately and notify us either by e-mail or
> telephone. You should not copy, forward or otherwise disclose the content
> of the e-mail. The views expressed in this communication may not
> necessarily be the view held by WHISHWORKS.
>

RE: Search in Solr Index

Posted by Matt Kuiper <ma...@issinc.com>.
What type of field are you using? String?  If so try another type, like text_general.

I believe with type String the contents are stored in the index exactly as they are inputted into the index.  So a search hit will have to match exactly the full value of the field, I assume in your case "Birmingham" is only part of the value.  With text_general and other types, the value will be tokenized and allow for hits on parts or variants of the value.

Matt


-----Original Message-----
From: Vijaya Narayana Reddy Bhoomi Reddy [mailto:vijaya.bhoomireddy@whishworks.com] 
Sent: Monday, April 20, 2015 9:31 AM
To: solr-user@lucene.apache.org
Subject: Search in Solr Index

Hi,

I am indexing some data from a Database. Data is getting indexed properly and when I query in the Solr stock UI with query parameters as *.*, I could see the documents with all the fields listed and as well the numFound reflecting properly. However,  if I perform a query with a simple string  for example "Birmingham", numFound returns 0 with no records to be displayed. There are records which are indexed that contains fields with the text "Birmingham". In the schema.xml, all the fields have been defined as indexed="true" and stored="true"

This is happening for any search query string. What could be the reason for this behavior?


Thanks & Regards
Vijay

--
The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you receive this e-mail in error please delete it from your system immediately and notify us either by e-mail or telephone. You should not copy, forward or otherwise disclose the content of the e-mail. The views expressed in this communication may not necessarily be the view held by WHISHWORKS.