[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: Lucene query to Solr query
From:       Mikhail Khludnev <mkhl () apache ! org>
Date:       2020-05-31 13:38:27
Message-ID: CAF8TkC43dS8wUG+8P_YK_OK8PFz3ztnaH8ZXWCG8efRzHmOjyw () mail ! gmail ! com
[Download RAW message or body]


There's nothing like this now. Presumably one might visit queries and
generate Query DSL json, but it might be a challenging problem.

On Sun, May 31, 2020 at 3:42 AM gnandre <arnoldbronley@gmail.com> wrote:

> I think this question here in this thread is similar to my question.
>
> https://lucene.472066.n3.nabble.com/Lucene-Query-to-Solr-query-td493751.html
>
>
> As suggested in that thread, I do not want to use toString method for
> Lucene query to pass it to the q param in SolrQuery.
>
> I am looking for a function that accepts org.apache.lucene.search.Query and
> returns org.apache.solr.client.solrj.SolrQuery. Is that possible?
>
> On Sat, May 30, 2020 at 8:08 AM Erick Erickson <erickerickson@gmail.com>
> wrote:
>
> > edismas is quite different from straight Lucene.
> >
> > Try attaching &debug=query to the input and
> > you'll see the difference.
> >
> > Best,
> > Erick
> >
> > > On May 30, 2020, at 12:32 AM, gnandre <arnoldbronley@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > I have following query which works fine as a lucene query:
> > > +(topics:132)^0.02607211 (topics:146)^0.008187325
> > > -asset_id:doc:en:index.html
> > >
> > > But, it does not work if I use it as a solr query with lucene as
> defType.
> > >
> > > For it to work, I need to convert it like following:
> > > q=+((topics:132)^0.02607211 (topics:146)^0.008187325
> > > +(-(asset_id:doc\:en\:index.html))&defType=edismax&q.op=OR
> > >
> > > Why does it not work as is? AFAIK syntax given in the first query is
> > > supported by edismax.
> >
> >
>


-- 
Sincerely yours
Mikhail Khludnev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic