match any field value? field:*?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

match any field value? field:*?

Ryan McKinley
Is it possible to search for all documents with a field?

I have documents with a bunch of fields and a field for 'error'
(string field with the actual error).  Is it possible do search for
documents that have an error?  Considering the new *:* syntax, i would
guess something like "error:*"

Do i need a separate boolean field that marks 'hasErrors' or something
like that?  If so, is there a clean way to do this with copyField?

thanks for any pointers

ryan
Reply | Threaded
Open this post in threaded view
|

Re: match any field value? field:*?

Erik Hatcher

On Mar 16, 2007, at 6:17 PM, Ryan McKinley wrote:
> Is it possible to search for all documents with a field?

Yup...

> I have documents with a bunch of fields and a field for 'error'
> (string field with the actual error).  Is it possible do search for
> documents that have an error?  Considering the new *:* syntax, i would
> guess something like "error:*"

error:[* TO *] does the trick... or all docs without an error is -
error:[* TO *]

        Erik

Reply | Threaded
Open this post in threaded view
|

Re: match any field value? field:*?

Ryan McKinley
thank you thank you

that does it.