Ticket #161 (closed Bug)
Searching for a document containing ":" generates an error
| Reported by: | ben.stringer@… | Owned by: | |
|---|---|---|---|
| Priority: | Minor | Milestone: | |
| Component: | Version: | 1.2 | |
| Keywords: | Cc: |
Description
[jira2trac import : issue created on May 29, 2005 8:39:31 PM CEST http://issues.cocoondev.org/browse/DSY-161 ]
I am using a convention for naming pages that uses colons (":") in the name. Using Daisy's simple search to locate documents that contain colons generates an error from the repository server:
Received exception from repository server.
Error performing query.
Error parsing query.
Encountered "<EOF>" at line 1, column 7. Was expecting one of: "(" ... <QUOTED> ... <TERM> ... <PREFIXTERM> ... <WILDTERM> ... "[" ... "{" ... <NUMBER> ...
Note: See
TracTickets for help on using
tickets.
[jira2trac import : comment created by bruno on May 30, 2005 2:54:36 AM CEST]
Ben,
What you enter inside the fulltext query box is a lucene query, which also has a certain syntax. This syntax is documented here:
http://jakarta.apache.org/lucene/docs/queryparsersyntax.html
(this is also linked from the help popup on the fulltext query page)
As you can see over there, a colon is used to search in (lucene-)fields of (lucene-)documents. Daisy indexes content as tree different lucene-fields: name, content and fields. Thus if you want to search for a word that occurs in the name of a document, you can do it with a query like "name:something" (without the quotes).
To search literally for something containing a colon, you need to enclose the text within quotes, e.g. "something:something" (including the quotes).
Hope this helps.