I didn't mean with <defaultField> that it was the way to define the default
field it in the schema, only a generic way to say "default field name".

The default field name, seems to be "text" in your case.

If the search query doesn't say on which field to search, the word will be
searched in that field.

in the query

AnimalName:German Shepard

you are saying:

"search the word "German" in the field "AnimalName" and the word "Shepard"
in the default field"

I think that that the search you want to do is

AnimalName:German AND AnimalName:Shepard

I don't know if there is a way to say to solr to search on all fields.

you may be copying the content of other fields to the "text" field.

See if there is something like

<copyField source="*" dest="text"/>

in the schema file.

Jorge


On Thu, Oct 30, 2008 at 3:13 PM, Yerraguntla <[EMAIL PROTECTED]> wrote:

>
> Hmm,
>
> I dont have any <defaultField> defined in the schema.xml.
> Can you give the exact syntax how it looks like in schema.xml
>
> I have <defaultSearchField>text</defaultSearchField>.
> Does it mean if sufficient requested count not available, it looks for the
> search string in any of the text fields that are indexed?
>
> Thanks
> Ravi
>
>
> Jorge Solari wrote:
> >
> > Your query
> >
> > AnimalName:German Shepard.
> >
> > means
> >
> > AnimalName:German <defaultField>:Shepard.
> >
> > whichever the defaultField is
> >
> > Try with
> > AnimalName:"German Shepard"
> >
> > or
> >
> > AnimalName:German AND AnimalName:Shepard.
> >
> >
> >
> > On Thu, Oct 30, 2008 at 12:58 PM, Yerraguntla <[EMAIL PROTECTED]>
> > wrote:
> >
> >>
> >> Hi,
> >>
> >> I have a data set with the following schema.
> >>
> >> PersonName:Text
> >> AnimalName:Text
> >> PlantName:Text
> >>
> >> <.... lot more attributes about each of them like nick name, animal nick
> >> name, plant generic name etc which are multually exclusive>
> >> UniqueId:long
> >>
> >> For each of the document data set, there will be only one value of the
> >> above
> >> three.
> >>
> >> In my solr query from client
> >>
> >> I am using AnimalName:German Shepard.
> >>
> >> The return result contains
> >> PersonName with 'Shepard' in it, even though I am querying on AnimalName
> >> field.
> >> Can anyone point me whats happening and how to prevent scanning other
> >> columns/fields.
> >>
> >> I appreciate your help.
> >>
> >> Thanks
> >> Ravi
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Solr-Searching-on-other-fields-which-are-not-in-query-tp20249798p20249798.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Solr-Searching-on-other-fields-which-are-not-in-query-tp20249798p20252475.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Reply via email to