Using a default index, one can do nodeIndex.get("message", "Hello") for exact matches, or nodeIndex.query("message", "Hel*") for approximate Lucene-based queries. This works correctly for me from Java.
But how do I do approximate queries through the webadmin Data Browser interface? Exact matches work fine, such as:
node:index:nodeIndex:message:"Hello"
but I can't see how to do the wildcard queries. The syntax is shown in the pop-up help panel as:
node:index:[index]:[query]
but I don't know what to put for the [query] part, and can't find any examples of this in the manual or the wiki. Have tried the following without success:
node:index:nodeIndex:"message:Hel*"
node:index:nodeIndex:message:"Hel*"
node:index:nodeIndex:"Hel*"
node:index:nodeIndex:Hel*
This should work:
node:index:nodeIndex:message:Hel*
The queryis message:Hel* so you just append it, more complex queries are also possible.
See the lucene syntax guide.
node:index:nodeIndex:message:Hel* OR message:Wor*
Issue created. https://github.com/neo4j/community/issues/138
Related
I try to find out which URLs exists for a specific domain and a specific domain-path in the google index. The urls have the following schema:
https://example.org/path1/<keyword>/path2/
the following google search works fine:
site:https://example.org/path1/*/path2/
but it delivers more than 40.000 findings. So I'll try to search for
https://example.org/path1/a*/path2/
but there where no results found (what can't be). Whats wrong? Any chance to deliver only Findings where Site-URL contains keywords starting with an "a"?
Thank you,
Jan
You can try the following
https://example.org/path1/*a
This will search for all the URL's which starts with https://example.org/path1/ which also contains the keyword a
You can refine your search by specifying multiple keywords:
https://example.org/path1/*a*/path2/
This will search for the same as in the 1st example but will conatin the /path2/ part of the URL as well. However this will match URL's if the keyword a is either before or after the 2nd path /path2/
I'm using Opeonlayers 3.18 + GeoServer. I can make a ogc filter for comparing a field and a value. How can i compare two fields?
Code below shows what i'm looking for:
var f = ol.format.ogc.filter.greaterThan('Field1', 100); // this works nicely
var f = ol.format.ogc.filter.greaterThan('Field1', 'Field2'); // this doesn't work
Equivalent working CQL filter is: 'Field1 > Field2'
Regards
This sort of filtering should work. I'd note that many databases may not have a way to perform that filter in an optimal way, and as such, there's a chance that the handling for such a filter is not correct.
The first thing to check out is if the GeoServer logs have any additional information. For most requests, there are log messages which will provide all the details (including the filter) for the request.
If OL3 is making a non-sense request, there should be some kind of parse error first. If the datastore is having trouble with the request, you might see an exception.
To help further, which version of GeoServer and which datastore are you using? Also, is there additional information in the logs?
Update: Based on the comment below, I checked out the Open Layers 3 source. If you look here, it looks like OL3 is treating the first argument as a properyName and the second as a literal. It is probably worth filling a bug/feature request on the project's GitHub page.
I want to execute multiple cypher queries at same time for the brower, how count i execute that. And i am using noe4j version for 2.2.5. My sample query was,
CREATE(n:Taxonomy{UUID:10001, name:"BOSH", classType:"Interface Type", version:"2.2",isDeleted:"0"});
CREATE(n:Taxonomy{UUID:10002, name:"Iaas", classType:"AWS", version:"0.0",isDeleted:"0"});
CREATE(n:Taxonomy{UUID:10003, name:"order lifecycle", classType:"draft order", version:"0.0",isDeleted:"0"});
CREATE(n:IaaSTemplate{UUID:20001, IaasName:"Iaas Template 1",isDeleted:"0"});
CREATE(n:TemplateFunction{UUID:30001, functionName:"bosh target",isDeleted:"0"});
CREATE(n:TemplateFunction{UUID:30002, functionName:"bosh login",isDeleted:"0"});
Batching multiple queries into one is not (yet) supported by the Browser.
However, the specific queries in your question can be easily combined into a single query by:
Removing the n identifier from all the nodes.
Within a single query, an identifier is associated with a specific instance of a node or relationship (ignoring the effect of WITH clauses). But, since you don't actually use the identifier, getting rid of it would allow all the CREATE clauses to co-exist in the same query.
Removing all semicolons (except the last one).
So, this should work:
CREATE(:Taxonomy{UUID:10001, name:"BOSH", classType:"Interface Type", version:"2.2",isDeleted:"0"})
CREATE(:Taxonomy{UUID:10002, name:"Iaas", classType:"AWS", version:"0.0",isDeleted:"0"})
CREATE(:Taxonomy{UUID:10003, name:"order lifecycle", classType:"draft order", version:"0.0",isDeleted:"0"})
CREATE(:IaaSTemplate{UUID:20001, IaasName:"Iaas Template 1",isDeleted:"0"})
CREATE(:TemplateFunction{UUID:30001, functionName:"bosh target",isDeleted:"0"})
CREATE(:TemplateFunction{UUID:30002, functionName:"bosh login",isDeleted:"0"});
Unfortunately Neo4j Browser doesn't support that yet, it's on the long list of things.
You can use the bin/neo4j-shell that connects to a running browser.
Or a project like cycli which is a colorful, auto-complete shell for Neo4j that talks to the http interface and supports auth etc.
I am using node.js to connect to the neo4j database. Whenever I have to set an index for a node, I do it manually by going to the neo4j browser (localhost:7474).
CREATE INDEX ON :user(username)
First of all to be clear, this is an automatic index? Any changes or additions to :user are automatically maintained? Let me know if I am wrong.
If so, how does full text index work on neo4j? Is it the same process and neo manages automatically? For example does the following create full text index? Or we need to do something else?
CREATE INDEX ON :user(aboutme)
I built my own nodejs adapter to connect to neo4j, and so I only have access to cypher queries at the moment. To create an index I only have access to cypher or the browser (7474). So what is the proper way to create automatic fulltext index, preferably from the browser itself? And how do I access it using the cypher (or do I have to access it? does neo automatically figure out what index to use?). Online documentation and tutorials are a bit complicated for beginners :/ .
(I want to be able to do text search on the :user(aboutme) property)
If you want a full text index (where you can use the index to match on parts of the string and not the full, exact string), that isn't currently supported by the new cypher automatic indexes (like CREATE INDEX ON :user(username)). To do that you need to use what are called the legacy indexes. These use lucene under the covers and are much more powerful, but I believe they will eventually go away once that same functionality is supported with the new indexes.
Personally for full-text search I prefer using something like elasticsearch as it is easier to set up and use.
I've tried doing this with Umbraco 6.1.6. I've pretty much implemented what Drew did here: http://our.umbraco.org/forum/developers/extending-umbraco/23200-Lucene-with-spatialnet?p=0
I'm storing lat and long data in umbraco nodes. The nodes are being indexed as encided values with tiers. But, I am not returning any results when I add the DistanceFilter to the query.
I'm just wondering if anyone else has tried this and got it working. Perhaps you can post some code.
Thanks.
Josh,
Have you inspected the index using luke just to ensure that fields are there? Also have you tried running raw queries (get the generated query written out using code) on the index using luke?
Regards
Ismail