Form of Fuzzy Direct Index Query


Jamie Lawson <jamier...@...>
 

Trying to do a fuzzy full-text query in JanusGraph. I have a Lucene index backend running. I have a Propery Key named "text" that is of String type, and cardinality SINGLE. I have a Lucene-backed index called "fuzzysearch" based on that property. So, again:
  • The index name is "fuzzysearch"
  • The Property Key name is "text"
The index itself seems to work. This query in Scala does exactly what it's supposed to do:

     graph.indexQuery("fuzzysearch", "v.text:(Jones)").vertices

It returns the vertex whose text property key has the value "Jones". I would like to do a "textFuzzy" or "textContainsFuzzy" query with the parameter "Jons" to get the same vertex, in Scala. I do not see from the documentation how to do that. Where do I put the "textFuzzy"? Any help would be greatly appreciated.



David Pitera <piter...@...>
 

This page should have all the information you're looking for: http://docs.janusgraph.org/latest/index-parameters.html

Also, I would advise you to use the gremlin APIs (like the docs do) and avoid the direct index queries.

On Mon, Nov 13, 2017 at 4:48 PM, Jamie Lawson <jamier...@...> wrote:
Trying to do a fuzzy full-text query in JanusGraph. I have a Lucene index backend running. I have a Propery Key named "text" that is of String type, and cardinality SINGLE. I have a Lucene-backed index called "fuzzysearch" based on that property. So, again:
  • The index name is "fuzzysearch"
  • The Property Key name is "text"
The index itself seems to work. This query in Scala does exactly what it's supposed to do:

     graph.indexQuery("fuzzysearch", "v.text:(Jones)").vertices

It returns the vertex whose text property key has the value "Jones". I would like to do a "textFuzzy" or "textContainsFuzzy" query with the parameter "Jons" to get the same vertex, in Scala. I do not see from the documentation how to do that. Where do I put the "textFuzzy"? Any help would be greatly appreciated.


--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/22e7e20a-5afb-428a-9409-56e8c278f434%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


David Pitera <piter...@...>
 

Pulling from http://docs.janusgraph.org/latest/index-parameters.html :

1. check how you created the index, using either the `Mapping.STRING` or `Mapping.TEXT` parameter (because you can't use Mapping.TEXTSTRING

On Mon, Nov 13, 2017 at 4:56 PM, Jamie Lawson <jamier...@...> wrote:
Unfortunately, it doesn't. I've been working through the stuff on that page for 2 days. And it's not there. It has all kinds of examples but none of them work. Simply put, what do I need to put between the last set of double quotes in this statement to give me a fuzzy query?

 graph.indexQuery("fuzzysearch", "v.text:(Jones)").vertices

I'm not using the Groovy stuff, so that won't work. Where does "textFuzzy" go?

On Mon, Nov 13, 2017 at 1:52 PM, David Pitera <piter...@...> wrote:
This page should have all the information you're looking for: http://docs.janusgraph.org/latest/index-parameters.html

Also, I would advise you to use the gremlin APIs (like the docs do) and avoid the direct index queries.

On Mon, Nov 13, 2017 at 4:48 PM, Jamie Lawson <jamier...@...> wrote:
Trying to do a fuzzy full-text query in JanusGraph. I have a Lucene index backend running. I have a Propery Key named "text" that is of String type, and cardinality SINGLE. I have a Lucene-backed index called "fuzzysearch" based on that property. So, again:
  • The index name is "fuzzysearch"
  • The Property Key name is "text"
The index itself seems to work. This query in Scala does exactly what it's supposed to do:

     graph.indexQuery("fuzzysearch", "v.text:(Jones)").vertices

It returns the vertex whose text property key has the value "Jones". I would like to do a "textFuzzy" or "textContainsFuzzy" query with the parameter "Jons" to get the same vertex, in Scala. I do not see from the documentation how to do that. Where do I put the "textFuzzy"? Any help would be greatly appreciated.


--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/22e7e20a-5afb-428a-9409-56e8c278f434%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




David Pitera <piter...@...>
 

whoops.. continued..

unless you use Elasticsearch

2. ensure you using the proper gremlin call according to how you stored the index:

`g.V().has('text', textFuzzy('Jons'))` for` Mapping.STRING` or `g.V().has('text', textContainsFuzzy('Jons'))` for `Mapping.TEXT`

On Tue, Nov 14, 2017 at 2:59 PM, David Pitera <piter...@...> wrote:
Pulling from http://docs.janusgraph.org/latest/index-parameters.html :

1. check how you created the index, using either the `Mapping.STRING` or `Mapping.TEXT` parameter (because you can't use Mapping.TEXTSTRING

On Mon, Nov 13, 2017 at 4:56 PM, Jamie Lawson <jamier...@...> wrote:
Unfortunately, it doesn't. I've been working through the stuff on that page for 2 days. And it's not there. It has all kinds of examples but none of them work. Simply put, what do I need to put between the last set of double quotes in this statement to give me a fuzzy query?

 graph.indexQuery("fuzzysearch", "v.text:(Jones)").vertices

I'm not using the Groovy stuff, so that won't work. Where does "textFuzzy" go?

On Mon, Nov 13, 2017 at 1:52 PM, David Pitera <piter...@...> wrote:
This page should have all the information you're looking for: http://docs.janusgraph.org/latest/index-parameters.html

Also, I would advise you to use the gremlin APIs (like the docs do) and avoid the direct index queries.

On Mon, Nov 13, 2017 at 4:48 PM, Jamie Lawson <jamier...@...> wrote:
Trying to do a fuzzy full-text query in JanusGraph. I have a Lucene index backend running. I have a Propery Key named "text" that is of String type, and cardinality SINGLE. I have a Lucene-backed index called "fuzzysearch" based on that property. So, again:
  • The index name is "fuzzysearch"
  • The Property Key name is "text"
The index itself seems to work. This query in Scala does exactly what it's supposed to do:

     graph.indexQuery("fuzzysearch", "v.text:(Jones)").vertices

It returns the vertex whose text property key has the value "Jones". I would like to do a "textFuzzy" or "textContainsFuzzy" query with the parameter "Jons" to get the same vertex, in Scala. I do not see from the documentation how to do that. Where do I put the "textFuzzy"? Any help would be greatly appreciated.


--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/22e7e20a-5afb-428a-9409-56e8c278f434%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.