You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ben Sanchez <mr...@gmail.com> on 2008/03/18 15:47:47 UTC
Changing Solr Query Syntax
Hi solr users,
I need to change the query format for solr a little bit. How can I
accomplish this. I don't wan to modify the underlying lucene query
specification but just the way I query the index through the the GET http
method in solr.
Thanks a lot for your help.
Ben
Re: Changing Solr Query Syntax
Posted by Ben Sanchez <mr...@gmail.com>.
Shalin, thanks a lot for answering that fast.
Use Case:
I'm migrating from a proprietary index server (XYZ) to Solr. All my
applications and my customer's applications relay on the query specification
of XYZ. It would be hard to modify all those apps to use the Solr Query
Syntax (although, it would be ideal, Sorl query is a lot superior than that
of XYZ, but impractical).
On Tue, Mar 18, 2008 at 9:50 AM, Shalin Shekhar Mangar <
shalinmangar@gmail.com> wrote:
> Hi Ben,
>
> It would be nice if you can tell us your use-case so that we can be
> more helpful.
>
> Why does the normal query syntax not work well for you? What are you
> trying to accomplish? Maybe there is an easier way.
>
> On Tue, Mar 18, 2008 at 8:17 PM, Ben Sanchez <mr...@gmail.com> wrote:
> > Hi solr users,
> > I need to change the query format for solr a little bit. How can I
> > accomplish this. I don't wan to modify the underlying lucene query
> > specification but just the way I query the index through the the GET
> http
> > method in solr.
> > Thanks a lot for your help.
> >
> > Ben
> >
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
Re: Changing Solr Query Syntax
Posted by Yonik Seeley <yo...@apache.org>.
The other option would be a custom QParserPlugin.
-Yonik
On Tue, Mar 18, 2008 at 12:18 PM, Ben Sanchez <mr...@gmail.com> wrote:
> Shalin, Thanks a lot. I'll do that.
>
> On Tue, Mar 18, 2008 at 11:13 AM, Shalin Shekhar Mangar <
>
>
> shalinmangar@gmail.com> wrote:
>
> > Hi Ben,
> >
> > If I had to do this, I would start by adding a custom
> > javax.servlet.Filter into Solr. It should work fine since all you're
> > doing is replacing characters in the q parameter for requests coming
> > into /select handler. It's a bit hackish but that's exactly what
> > you're trying to do :)
> >
> > Don't know if there's an alternate/easier way.
> >
> > On Tue, Mar 18, 2008 at 9:30 PM, Ben Sanchez <mr...@gmail.com> wrote:
> > > Hi Shalin, thanks a lot for answering that fast.
> > >
> > >
> > > Use Case:
> > > I'm migrating from a proprietary index server (XYZ) to Solr. All my
> > > applications and my customer's applications relay on the query
> > specification
> > > of XYZ. It would be hard to modify all those apps to use the Solr Query
> > > Syntax (although, it would be ideal, Sorl query is a lot superior than
> > that
> > > of XYZ).
> > >
> > > Basically I need to replace : with = ; + with / and = with : in the
> > query
> > > syntax.
> > >
> > > Thank you.
> > >
> > >
> > > On Tue, Mar 18, 2008 at 9:50 AM, Shalin Shekhar Mangar <
> > > shalinmangar@gmail.com> wrote:
> > >
> > >
> > >
> > > > Hi Ben,
> > > >
> > > > It would be nice if you can tell us your use-case so that we can be
> > > > more helpful.
> > > >
> > > > Why does the normal query syntax not work well for you? What are you
> > > > trying to accomplish? Maybe there is an easier way.
> > > >
> > > > On Tue, Mar 18, 2008 at 8:17 PM, Ben Sanchez <mr...@gmail.com>
> > wrote:
> > > > > Hi solr users,
> > > > > I need to change the query format for solr a little bit. How can I
> > > > > accomplish this. I don't wan to modify the underlying lucene query
> > > > > specification but just the way I query the index through the the
> > GET
> > > > http
> > > > > method in solr.
> > > > > Thanks a lot for your help.
> > > > >
> > > > > Ben
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Shalin Shekhar Mangar.
> > > >
> > >
> >
> >
> >
> > --
> > Regards,
> > Shalin Shekhar Mangar.
> >
>
Re: Changing Solr Query Syntax
Posted by Ben Sanchez <mr...@gmail.com>.
Shalin, Thanks a lot. I'll do that.
On Tue, Mar 18, 2008 at 11:13 AM, Shalin Shekhar Mangar <
shalinmangar@gmail.com> wrote:
> Hi Ben,
>
> If I had to do this, I would start by adding a custom
> javax.servlet.Filter into Solr. It should work fine since all you're
> doing is replacing characters in the q parameter for requests coming
> into /select handler. It's a bit hackish but that's exactly what
> you're trying to do :)
>
> Don't know if there's an alternate/easier way.
>
> On Tue, Mar 18, 2008 at 9:30 PM, Ben Sanchez <mr...@gmail.com> wrote:
> > Hi Shalin, thanks a lot for answering that fast.
> >
> >
> > Use Case:
> > I'm migrating from a proprietary index server (XYZ) to Solr. All my
> > applications and my customer's applications relay on the query
> specification
> > of XYZ. It would be hard to modify all those apps to use the Solr Query
> > Syntax (although, it would be ideal, Sorl query is a lot superior than
> that
> > of XYZ).
> >
> > Basically I need to replace : with = ; + with / and = with : in the
> query
> > syntax.
> >
> > Thank you.
> >
> >
> > On Tue, Mar 18, 2008 at 9:50 AM, Shalin Shekhar Mangar <
> > shalinmangar@gmail.com> wrote:
> >
> >
> >
> > > Hi Ben,
> > >
> > > It would be nice if you can tell us your use-case so that we can be
> > > more helpful.
> > >
> > > Why does the normal query syntax not work well for you? What are you
> > > trying to accomplish? Maybe there is an easier way.
> > >
> > > On Tue, Mar 18, 2008 at 8:17 PM, Ben Sanchez <mr...@gmail.com>
> wrote:
> > > > Hi solr users,
> > > > I need to change the query format for solr a little bit. How can I
> > > > accomplish this. I don't wan to modify the underlying lucene query
> > > > specification but just the way I query the index through the the
> GET
> > > http
> > > > method in solr.
> > > > Thanks a lot for your help.
> > > >
> > > > Ben
> > > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > > Shalin Shekhar Mangar.
> > >
> >
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
Re: Changing Solr Query Syntax
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Hi Ben,
If I had to do this, I would start by adding a custom
javax.servlet.Filter into Solr. It should work fine since all you're
doing is replacing characters in the q parameter for requests coming
into /select handler. It's a bit hackish but that's exactly what
you're trying to do :)
Don't know if there's an alternate/easier way.
On Tue, Mar 18, 2008 at 9:30 PM, Ben Sanchez <mr...@gmail.com> wrote:
> Hi Shalin, thanks a lot for answering that fast.
>
>
> Use Case:
> I'm migrating from a proprietary index server (XYZ) to Solr. All my
> applications and my customer's applications relay on the query specification
> of XYZ. It would be hard to modify all those apps to use the Solr Query
> Syntax (although, it would be ideal, Sorl query is a lot superior than that
> of XYZ).
>
> Basically I need to replace : with = ; + with / and = with : in the query
> syntax.
>
> Thank you.
>
>
> On Tue, Mar 18, 2008 at 9:50 AM, Shalin Shekhar Mangar <
> shalinmangar@gmail.com> wrote:
>
>
>
> > Hi Ben,
> >
> > It would be nice if you can tell us your use-case so that we can be
> > more helpful.
> >
> > Why does the normal query syntax not work well for you? What are you
> > trying to accomplish? Maybe there is an easier way.
> >
> > On Tue, Mar 18, 2008 at 8:17 PM, Ben Sanchez <mr...@gmail.com> wrote:
> > > Hi solr users,
> > > I need to change the query format for solr a little bit. How can I
> > > accomplish this. I don't wan to modify the underlying lucene query
> > > specification but just the way I query the index through the the GET
> > http
> > > method in solr.
> > > Thanks a lot for your help.
> > >
> > > Ben
> > >
> >
> >
> >
> > --
> > Regards,
> > Shalin Shekhar Mangar.
> >
>
--
Regards,
Shalin Shekhar Mangar.
Re: Changing Solr Query Syntax
Posted by Ben Sanchez <mr...@gmail.com>.
Hi Shalin, thanks a lot for answering that fast.
Use Case:
I'm migrating from a proprietary index server (XYZ) to Solr. All my
applications and my customer's applications relay on the query specification
of XYZ. It would be hard to modify all those apps to use the Solr Query
Syntax (although, it would be ideal, Sorl query is a lot superior than that
of XYZ).
Basically I need to replace : with = ; + with / and = with : in the query
syntax.
Thank you.
On Tue, Mar 18, 2008 at 9:50 AM, Shalin Shekhar Mangar <
shalinmangar@gmail.com> wrote:
> Hi Ben,
>
> It would be nice if you can tell us your use-case so that we can be
> more helpful.
>
> Why does the normal query syntax not work well for you? What are you
> trying to accomplish? Maybe there is an easier way.
>
> On Tue, Mar 18, 2008 at 8:17 PM, Ben Sanchez <mr...@gmail.com> wrote:
> > Hi solr users,
> > I need to change the query format for solr a little bit. How can I
> > accomplish this. I don't wan to modify the underlying lucene query
> > specification but just the way I query the index through the the GET
> http
> > method in solr.
> > Thanks a lot for your help.
> >
> > Ben
> >
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
Re: Changing Solr Query Syntax
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Hi Ben,
It would be nice if you can tell us your use-case so that we can be
more helpful.
Why does the normal query syntax not work well for you? What are you
trying to accomplish? Maybe there is an easier way.
On Tue, Mar 18, 2008 at 8:17 PM, Ben Sanchez <mr...@gmail.com> wrote:
> Hi solr users,
> I need to change the query format for solr a little bit. How can I
> accomplish this. I don't wan to modify the underlying lucene query
> specification but just the way I query the index through the the GET http
> method in solr.
> Thanks a lot for your help.
>
> Ben
>
--
Regards,
Shalin Shekhar Mangar.