Querying for an id with a colon in it

2007-10-15 Thread Robert Young
Hi,

If my unique identifier is called guid and one of the ids in it is,
for example, article:123. How can I query for that article id? I
have tried a number of ways but I always either get no results or an
error. It seems to be to do with having the colon in the id value.

eg.
?q=guid:article:123 - error
?q=guid:article:123 - error
?q=guid:article%3A123 - error

Any ideas?
Cheers
Rob


Re: Querying for an id with a colon in it

2007-10-15 Thread Brian Carmalt

Robert Young schrieb:

Hi,

If my unique identifier is called guid and one of the ids in it is,
for example, article:123. How can I query for that article id? I
have tried a number of ways but I always either get no results or an
error. It seems to be to do with having the colon in the id value.

eg.
?q=guid:article:123 - error
?q=guid:article:123 - error
?q=guid:article%3A123 - error

Any ideas?
Cheers
Rob

  

Try it with a \: That's what the Lucene Query Parser Syntax page says.
It doesn't cause an error, but I don't know if it will provide the 
results you want.


Brian


Re: Querying for an id with a colon in it

2007-10-15 Thread Robert Young
Hey,

Thanks Brian, that works perfectly.

Cheers
Rob

On 10/15/07, Brian Carmalt [EMAIL PROTECTED] wrote:
 Robert Young schrieb:
  Hi,
 
  If my unique identifier is called guid and one of the ids in it is,
  for example, article:123. How can I query for that article id? I
  have tried a number of ways but I always either get no results or an
  error. It seems to be to do with having the colon in the id value.
 
  eg.
  ?q=guid:article:123 - error
  ?q=guid:article:123 - error
  ?q=guid:article%3A123 - error
 
  Any ideas?
  Cheers
  Rob
 
 
 Try it with a \: That's what the Lucene Query Parser Syntax page says.
 It doesn't cause an error, but I don't know if it will provide the
 results you want.

 Brian



Re: Querying for an id with a colon in it

2007-10-15 Thread Chris Hostetter

:  ?q=guid:article:123 - error

i would really like to know what error you got from that query ... it is 
not only valid, but it should also get you the same results as back-slash 
escaping the colon.

(both are working for me right now ... which version of Solr are you 
using?)



-Hoss