search problem after using EdgeNGramFilter

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

search problem after using EdgeNGramFilter

Jason
I am using EdgeNGramFilter for wildcard search.
But the search result is same whether or not followed by asterisk.
When I search without asterisk, I just want to retrive in original terms(except ngram terms).

[example]
- doc1 : "enterprise search server"
- doc2 : "enter key"

When I query 'enter*', both doc1 and doc2 are retrived.
It's ok.
When I query 'enter', both doc1 and doc2 are also retrived.
But I just want a doc2.

How should I do this?
please help!
Reply | Threaded
Open this post in threaded view
|

Re: search problem after using EdgeNGramFilter

iorixxx
> I am using EdgeNGramFilter for wildcard search.
> But the search result is same whether or not followed by
> asterisk.
> When I search without asterisk, I just want to retrive in
> original
> terms(except ngram terms).
>
> [example]
> - doc1 : "enterprise search server"
> - doc2 : "enter key"
>
> When I query 'enter*', both doc1 and doc2 are retrived.
> It's ok.
> When I query 'enter', both doc1 and doc2 are also
> retrived.
> But I just want a doc2.
>
> How should I do this?
> please help!

You need to remove EdgeNGramFilter for that.
What is your purpose of using EdgeNGramFilter for wildcard search?


     
Reply | Threaded
Open this post in threaded view
|

Re: search problem after using EdgeNGramFilter

Jason
Hi, iorixxx
I thought that I have to use NGramFilter for wildcard search.
But It was the wrong idea.
Thanks, iorixxx
Reply | Threaded
Open this post in threaded view
|

Re: search problem after using EdgeNGramFilter

Chris Hostetter-3

: I thought that I have to use NGramFilter for wildcard search.
: But It was the wrong idea.
: Thanks, iorixxx

your confusion may be because using EdgeNGramFilter is a way to make
"prefix" queries faster by precomputing hte prefixes as index time
instead of at query time.  (trading disk space for speed)

having "q=enter" create a term query that can match "enter",
"entertainment" and "enterprice" is the point in thta case -- but if
executing a prefix query ("q=enter*") is fast enough for you, then
you don't need EdgeNGramFilter.


-Hoss
Reply | Threaded
Open this post in threaded view
|

Viewing query debug explanation with dismax and multicore

Sara
In reply to this post by iorixxx
Hi All,

I am trying to debug my queries and see how scoring is done. I have 6 cores and
send the quesy to 6 shards and it's dismax handler (with search on various
fields with different boostings). I enable debug, and view source but I'm unable
to see the explanations. I'm returning ID and score as the "fl" field. Am I
supposed to retun something else to be able to see the explanation? or is it
because it's multi-core?


     
Reply | Threaded
Open this post in threaded view
|

limit the search results to one category

Sara
Hi all,

I am using a dismax request handler with vrious fieds that it searches, but I
also want to enable the users to select a category from a drop-down list
and only get the results that belong to that category. It seems I can't use a
nested query with dismax as the first one and standard as the nested one? Is
there another way to do this?


 
Reply | Threaded
Open this post in threaded view
|

Re: limit the search results to one category

iorixxx
> I am using a dismax request handler with vrious fieds that
> it searches, but I
> also want to enable the users to select a category from a
> drop-down list
> and only get the results that belong to that category. It
> seems I can't use a
> nested query with dismax as the first one and standard as
> the nested one? Is
> there another way to do this?

Filter Queries? fq=category:foo

http://wiki.apache.org/solr/CommonQueryParameters#fq   



Reply | Threaded
Open this post in threaded view
|

Re: limit the search results to one category

Sara
I guess so. I didn't know I could use it with dismax I'll try. thanks Ahmet.




________________________________
From: Ahmet Arslan <[hidden email]>
To: [hidden email]
Sent: Tue, December 14, 2010 5:42:51 PM
Subject: Re: limit the search results to one category

> I am using a dismax request handler with vrious fieds that
> it searches, but I
> also want to enable the users to select a category from a
> drop-down list
> and only get the results that belong to that category. It
> seems I can't use a
> nested query with dismax as the first one and standard as
> the nested one? Is
> there another way to do this?

Filter Queries? fq=category:foo

http://wiki.apache.org/solr/CommonQueryParameters#fq   


Reply | Threaded
Open this post in threaded view
|

R: limit the search results to one category

Andrea Gazzarini
In reply to this post by Sara
Did you try with filterquery?

Andrea Gazzarini

-----Original Message-----
From: sara motahari <[hidden email]>
Date: Tue, 14 Dec 2010 17:34:52
To: <[hidden email]>
Reply-To: [hidden email]
Subject: limit the search results to one category

Hi all,

I am using a dismax request handler with vrious fieds that it searches, but I
also want to enable the users to select a category from a drop-down list
and only get the results that belong to that category. It seems I can't use a
nested query with dismax as the first one and standard as the nested one? Is
there another way to do this?


 
Reply | Threaded
Open this post in threaded view
|

Re: Viewing query debug explanation with dismax and multicore

Chris Hostetter-3
In reply to this post by Sara

: I am trying to debug my queries and see how scoring is done. I have 6 cores and
: send the quesy to 6 shards and it's dismax handler (with search on various
: fields with different boostings). I enable debug, and view source but I'm unable
: to see the explanations. I'm returning ID and score as the "fl" field. Am I

you'll need to provide us with more details -- what does your query URL
look like? what does your request handler config look like? what does the
response look like? (does it even have a debug section)

FWIW: doing a distributed query across the "example" setup from the 3x
branch and the trunk i was able to see score explanations.

: supposed to retun something else to be able to see the explanation? or is it
: because it's multi-core?

FYI: a terminology clarification: "Multi-core" is a term used to describe
a single solr instance running multiple SolrCores (ie: using solr.xml) ...
using the shards param is a refered to as "distributed search" ... they
are orthoginal concepts.  you can do a distributed search across
several solr instances that are not using multi-core, or you can
query a core in a multi-core instance, or you can do a
distributed search of several cores, some or all of which may be
running as part or multi-core solr instances.

-Hoss
Reply | Threaded
Open this post in threaded view
|

Re: limit the search results to one category

Chris Hostetter-3
In reply to this post by Sara

: Subject: limit the search results to one category
: References: <[hidden email]>
:     <[hidden email]>
: In-Reply-To: <[hidden email]>

http://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists

When starting a new discussion on a mailing list, please do not reply to
an existing message, instead start a fresh email.  Even if you change the
subject line of your email, other mail headers still track which thread
you replied to and your question is "hidden" in that thread and gets less
attention.   It makes following discussions in the mailing list archives
particularly difficult.



-Hoss