Re: Is it possible to use limit and sort with BlockJoin Facet?

2017-12-31 Thread Kamuela Lau
Thank you very much for your help.

2017/12/29 15:46 "Mikhail Khludnev" :

> On Fri, Dec 29, 2017 at 4:37 AM, Kamuela Lau 
> wrote:
>
> > Hello,
> >
> > Thank you very much for the confirmation.
> >
> > As BJQFacet doesn't support limit, I have the impression that if the
> number
> > of documents is large,
> > there would be a noticeable decrease in performance. Is this correct?
> >
>
> No. Limiting facet almost never makes it faster.
>
>
> >
> > If so, I was considering instead using JSON Facet API to create
> > parent/child relationships with facets, however I could not find an
> > official document with specific details.
> > JSON Facet API appears to be quite fast,  but all the documentation I
> could
> > find was at the link below:
> > http://yonik.com/json-facet-api/
> >
> > I would like to investigate more about how to use JSON Facet API, so any
> > information or a point in the right direction would be very helpful.
> >
> https://lucene.apache.org/solr/guide/7_2/json-facet-api.html
>
> You are welcome.
>
> >
> > Thanks,
> >
> > On Fri, Dec 29, 2017 at 6:50 AM, Mikhail Khludnev 
> wrote:
> >
> > > Hello,
> > > Block join works in the single core only. Please check the docs.
> > > BJQFacet doesn't support limit and sort.
> > >
> > > On Thu, Dec 28, 2017 at 12:39 PM, Kamuela Lau 
> > > wrote:
> > >
> > > > Hi All,
> > > >
> > > > I am currently trying to figure out a way to apply a parent/child
> > > > relationship between two cores to searches.
> > > > I thought that BlockJoin Facet could be a good way to do this, but I
> > > would
> > > > like to know, is it impossible to use limit and sort with BlockJoin
> > > Facet?
> > > >
> > > > Thanks,
> > > > Kamu
> > > >
> > > >
> > > > On Tue, Dec 26, 2017 at 2:31 PM, Kamuela Lau 
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I am working on applying parent/child types to search using Solr,
> and
> > > > > wanted to inquire about two things.
> > > > >
> > > > > 1) BlockJoin Facet
> > > > >
> > > > > Currently, there are two cores. The first core (the item core) has
> 16
> > > > > million documents, and the second core (the product core) has 3
> > million
> > > > > documents.
> > > > > The product core is the parent, and the item core is the child.
> > > > >
> > > > > To apply this parent/child relationship to searches, I thought
> that I
> > > > > could use BlockJoin Facet,
> > > > > but because the number of documents being searched is so large, I
> am
> > > > > worried about the decrease in performance of Solr when using
> > BlockJoin
> > > > > Facet.
> > > > >
> > > > > I thought it may be possible to avoid dips in performance while
> using
> > > > > BlockJoin Facet by using limit and sort,
> > > > > however when I tried to look up more information about this, I was
> > > unsure
> > > > > of if that is possible.
> > > > >
> > > > > When using BlockJoin Facet, is it not possible to use limit and
> sort?
> > > > >
> > > > > 2) JSON Facet API
> > > > >
> > > > > While I was researching about the above problem, I came across JSON
> > > Facet
> > > > > API.
> > > > > Is it possible to do the same thing as BlockJoin Facet with JSON
> > Facet
> > > > API?
> > > > > If it is possible, what is the most appropriate way to use each
> one?
> > > > >
> > > > > I was unable to find an official document with more detailed
> > > information
> > > > > about Solr's JSON Facet API,
> > > > > so if anyone knows of a relevant resource or reference material, I
> > > would
> > > > > be grateful if you could share it.
> > > > >
> > > > > I apologize for the rather open-ended question, but an answer or
> > even a
> > > > > point in the right direction (an article
> > > > > or resource) would be greatly appreciated.
> > > > >
> > > > > Thanks,
> > > > > Kamu
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Sincerely yours
> > > Mikhail Khludnev
> > >
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>


Limit edismax search to a certain field value and find out matched fields on the results

2017-12-31 Thread Sami al Subhi
Hello,

I have these query parameters:

  'q' => "iphone",
  'echoParams' => "explicit",
  'defType' =>'edismax',
  'fl' => 'name,category,score',
  'qf' =>'name_suggest_edge^50 name_suggest_exact^50  name_suggest_ngram',
  'pf' =>'name_suggest_edge^100 '

1) How can I limit the search to the docs that have the field value
'category:phones'

2)An other question: is there a way to know which fields q was matched on 

name_suggest_edge
 name_suggest_exact
 name_suggest_ngram

 when the results are returned.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Limit edismax search to a certain field value and find out matched fields on the results

2017-12-31 Thread Erick Erickson
(1) You just include a fielded search: I.e q=category:phones.
Including the field will override the automatic distribution across
fields. Add &debug=query to see what the final parsed form is.

(2) Not really, people have used highlighting to determine this
though. That can be rather expensive. With the example given, and
assuming you want the docs ordered exact/edge/ngram you could boost
them differently...

Best,
Erick

On Sun, Dec 31, 2017 at 10:17 AM, Sami al Subhi  wrote:
> Hello,
>
> I have these query parameters:
>
>   'q' => "iphone",
>   'echoParams' => "explicit",
>   'defType' =>'edismax',
>   'fl' => 'name,category,score',
>   'qf' =>'name_suggest_edge^50 name_suggest_exact^50  name_suggest_ngram',
>   'pf' =>'name_suggest_edge^100 '
>
> 1) How can I limit the search to the docs that have the field value
> 'category:phones'
>
> 2)An other question: is there a way to know which fields q was matched on
>
> name_suggest_edge
>  name_suggest_exact
>  name_suggest_ngram
>
>  when the results are returned.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Limit edismax search to a certain field value and find out matched fields on the results

2017-12-31 Thread Sami al Subhi
thank you for your reply Erick. 
That solved the problem. 

q=iphone +category:phones



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Query fields with data of certain length

2017-12-31 Thread Zheng Lin Edwin Yeo
Hi,

Would like to check, if it is possible to query a field which has data of
more than a certain length?

Like for example, I want to query the field subject that has more than 255
bytes. Is it possible?

I am currently using Solr 6.5.1.

Regards,
Edwin