Lucene Query Syntax of field with a space -


I am trying to do two Lusen questions. My first query looks like this:

  Level: "dangerous"   

My second query looks like this: < / P>

  IP address: "11.22.333.444"   

I can not find a query error, however, I know that with matching IP address There are documents. For this reason, I suspect that the location between "IP" and "address" is causing the problem. However, if I am not an expert in Lucene, then I am not sure I am right in that.

When I look at my results set using the postman, I can see a document with a field that looks like this:

  "IP Address ":" 11.22.333.444 "  

Can anyone tell me that my query is correct? Or, if I'm missing something?

Thank you!

Yes, this location is a problem.

The location of the field name is acceptable, but conflict with query parser syntax. Address: "11.22.333.444"

You can avoid location by using a slash before the location, such as :

  IP address: "11.22.333.444"    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -