two types of answers in my query

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

two types of answers in my query

Mysurf Mail
Hi,
A general question:


Let's say I have Car And CarParts 1:n relation.

And I have discovered that the user had entered in the search field instead
of car name - a part serial number (SKU).
(I discovered it useing regex)

Is there a way to fetch different types of answers in Solr?
Is there a way to fetch mixed types in the answers?
Is there something similiar to that and how is that feature called?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: two types of answers in my query

Gora Mohanty-3
On 9 July 2013 12:08, Mysurf Mail <[hidden email]> wrote:

> Hi,
> A general question:
>
>
> Let's say I have Car And CarParts 1:n relation.
>
> And I have discovered that the user had entered in the search field instead
> of car name - a part serial number (SKU).
> (I discovered it useing regex)
>
> Is there a way to fetch different types of answers in Solr?
> Is there a way to fetch mixed types in the answers?
> Is there something similiar to that and how is that feature called?

Your description is not clear enough. What do you mean
by "different types of answers", and "mixed types"?

Assuming that you want to have a different query, or multiple
different queries, when you deduce on the front-end that the
user might have entered a part number instead of a name,
you will need to change the query/queries going to Solr, and
collate the results.

Regards,
Gora
Reply | Threaded
Open this post in threaded view
|

Re: two types of answers in my query

Jack Krupansky-2
In reply to this post by Mysurf Mail
Usually a car term and a car part term will look radically different. So,
simply use the edismax query parser and set "qf" to be both the car and car
part fields. If either matches, the document will be selected. And if you
have a "type" field, you can check that to see if a car or part was matched
in the results.

-- Jack Krupansky

-----Original Message-----
From: Mysurf Mail
Sent: Tuesday, July 09, 2013 2:38 AM
To: [hidden email]
Subject: two types of answers in my query

Hi,
A general question:


Let's say I have Car And CarParts 1:n relation.

And I have discovered that the user had entered in the search field instead
of car name - a part serial number (SKU).
(I discovered it useing regex)

Is there a way to fetch different types of answers in Solr?
Is there a way to fetch mixed types in the answers?
Is there something similiar to that and how is that feature called?

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: two types of answers in my query

Mysurf Mail
This will work.
Thanks.


On Tue, Jul 9, 2013 at 4:37 PM, Jack Krupansky <[hidden email]>wrote:

> Usually a car term and a car part term will look radically different. So,
> simply use the edismax query parser and set "qf" to be both the car and car
> part fields. If either matches, the document will be selected. And if you
> have a "type" field, you can check that to see if a car or part was matched
> in the results.
>
> -- Jack Krupansky
>
> -----Original Message----- From: Mysurf Mail
> Sent: Tuesday, July 09, 2013 2:38 AM
> To: [hidden email]
> Subject: two types of answers in my query
>
>
> Hi,
> A general question:
>
>
> Let's say I have Car And CarParts 1:n relation.
>
> And I have discovered that the user had entered in the search field instead
> of car name - a part serial number (SKU).
> (I discovered it useing regex)
>
> Is there a way to fetch different types of answers in Solr?
> Is there a way to fetch mixed types in the answers?
> Is there something similiar to that and how is that feature called?
>
> Thank you.
>