Sphinx Search borks if search contains a /

Bug #794669 reported by Chris St. Pierre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DokuWiki Sphinx Search plugin
New
Undecided
Unassigned

Bug Description

If you enter a search string with a forward slash in it, Sphinx Search erroneously reports:

Could not connect to Sphinx search engine.

In the code, it doesn't appear to check what error it got, just if there was an error. In this case, the error is:

index dk_main: syntax error, unexpected '/' near '/b*) | (@(body,title) a/b)'.

My thought is that it would probably be best to just strip forward slashes (and any other illegal characters) from the query before searching. Whatever the course of action, claiming a connection error has occurred is certainly not the right thing.

Revision history for this message
Ivinco (info-ivinco) wrote :

Hello, what version do you use?
I testing forward slash and it works fine.
Could you provide example of query?

Revision history for this message
Chris St. Pierre (stpierre) wrote : Re: [Bug 794669] Re: Sphinx Search borks if search contains a /

I am using the 2010-03-31 release of Sphinx Search, and Sphinx v.1.10
(which is what's available for RHEL 5).

It looks like the bug is caused by any query that contains a forward
slash in any position but the final position. So the following all
cause problems:

/foo
foo/bar

The following are fine:

foo/
foo/bar/
/

Thanks.

On Thu, Jun 9, 2011 at 9:04 AM, Ivinco <email address hidden> wrote:
> Hello, what version do you use?
> I testing forward slash and it works fine.
> Could you provide example of query?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/794669
>
> Title:
>  Sphinx Search borks if search contains a /
>
> Status in DokuWiki Sphinx Search plugin:
>  New
>
> Bug description:
>  If you enter a search string with a forward slash in it, Sphinx Search
>  erroneously reports:
>
>  Could not connect to Sphinx search engine.
>
>  In the code, it doesn't appear to check what error it got, just if
>  there was an error.  In this case, the error is:
>
>  index dk_main: syntax error, unexpected '/' near '/b*) |
>  (@(body,title) a/b)'.
>
>  My thought is that it would probably be best to just strip forward
>  slashes (and any other illegal characters) from the query before
>  searching.  Whatever the course of action, claiming a connection error
>  has occurred is certainly not the right thing.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dokuwiki-sphinxsearch/+bug/794669/+subscriptions
>

--
Chris St. Pierre

Revision history for this message
Ivinco (info-ivinco) wrote :

I can't reproduce the bug.
What version of DokuWiki Sphinx Search plugin do you use?
What version of DokuWiki do you use?

Revision history for this message
Chris St. Pierre (stpierre) wrote :

I am using the 2010-03-31 release of Sphinx Search, and the 2009-12-25
release of Dokuwiki.

On Tue, Jun 21, 2011 at 2:48 AM, Ivinco <email address hidden> wrote:
> I can't reproduce the bug.
> What version of DokuWiki Sphinx Search plugin do you use?
> What version of DokuWiki do you use?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/794669
>
> Title:
>  Sphinx Search borks if search contains a /
>
> Status in DokuWiki Sphinx Search plugin:
>  New
>
> Bug description:
>  If you enter a search string with a forward slash in it, Sphinx Search
>  erroneously reports:
>
>  Could not connect to Sphinx search engine.
>
>  In the code, it doesn't appear to check what error it got, just if
>  there was an error.  In this case, the error is:
>
>  index dk_main: syntax error, unexpected '/' near '/b*) |
>  (@(body,title) a/b)'.
>
>  My thought is that it would probably be best to just strip forward
>  slashes (and any other illegal characters) from the query before
>  searching.  Whatever the course of action, claiming a connection error
>  has occurred is certainly not the right thing.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dokuwiki-sphinxsearch/+bug/794669/+subscriptions
>

--
Chris St. Pierre

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.