I'm new in graph database - OrientDB.
I have a problem to search vertex connected to other vertex with specific edge.
For example:
I have a database - MovieRatings (public database OrientDB). I want search only Adventure type of movies.
How can I do it?
Thank you for your answer.
Try this:
select from Movies where out("hasGenera").description contains "Adventure"
Hope it helps
Regards
Related
My cloudant database was created with the following: msg.payload via tweetnode to cloudant
{
"timestamp" : msg.tweet.timestamp_ms,
"tweet" : msg.tweet.text,
"sentiment" : msg.sentiment.score
}
I would like to search the tweets by word and a range of dates. Then save the results by tagging the tweets found back to cloudant via node-red.
This seems like a routine thing people do. I have not found any flows that do this. Any help is appreciated
Your index look right. Maybe the 404 was caused by the white spaces you have around the colon. Here a quick example: https://gist.github.com/lgfa29/d965e66bf1ffa0fff7ab26f314ea98de
You can copy this JSON document, click on the three dashes in the top right of the Node-RED editor and select Import > Clipboard. Then just paste the JSON content there and drop the nodes somewhere. You will also need to update the Cloudant node to point to your database and search index.
To query using search indexes you can use the Lucene query syntax, so to search for a range you would do something like timestamp:[1551464030329 TO 1551465568517]
Here is a sample I deployed: https://node-red-pet-dev.mybluemix.net/search?from=0&to=1651464030328&tweet=zebra* (sorry, my tweets are not very imaginative)
HI I'm new to cloudant (and couch and asking questions on stackoverflow so I hope I manage to be vaguely clear about what I'm asking ) and I'm trying to do probably the second most basic geo task but am hitting a dead end.
I've got a database of docs which are geojson objects, I've created an index so I can query for intersections etc but it seems the only options I have in the url is the format=legacy (gives me the ids) and the format=geojson and the include_docs parameter - what I'd like to do is give back a particular view of the result set - I'm not interested in the geometry of the object (which is a big lump of data and it's likely that a number of other properties may be in the document that I'd rather filter out)
is there a correct way to do this in a single api call or do I need to fetch the doc ids (legacy format) and then issue a second query to bring back my chosen 'view' for each document id given in the result of format=legacy response
Thanks
I'm new to cloudant, i want to fetch records by lat and long with particular category.
//This is getting records by Lat and Long
dbname/_design/ad/_geo/geoidx?lat=29.2609417&lon=71.1750101&radius=100
but i want to fetch records by particular category something like this...
dbname/_design/ad/_geo/geoidx?lat=22.2609417&lon=73.1750101&radius=100&item_type_id: '12345'
how can i achieve this? please reply...
Thanks..
You can't achieve this using the Cloudant Geo index. You need to use Cloudant Search (powered by Lucene Geo), which allows you to combine a radius search with attribute search. Here's a tutorial: https://developer.ibm.com/clouddataservices/2016/01/07/geospatial-query-with-cloudant-search/
The only caveat is with Cloudant Search you can only do bounding box and radius searches -- no polygon searches.
I am using solr for searching. I wants to improve my search result quality based on previously searched terms. Suppose, I have two products in my index with names 'Jewelry Crystal'(say it belongs to Group 1) & 'Compound Crystal'(say it belongs to Group 2). Now, if we query for 'Crystal', then both the products will come.
Let say, if I had previously searched for 'Jewelry Ornament', then I searches for 'Crystal', then I expects that only one result ('Jewelry Crystal') should come. There is no point of showing 'Compound Crystal' product to any person looking for jewelry type product.
Is there any way in SOLR to honour this kind of behavior or is there any other method to achieve this.
First of all, there's nothing built-in in Solr to achive this. What you need for this is some kind of user session, which is not supported by Solr, or a client side storage like a cookie or something for the preceding query.
But to achive the upvote you can use a runtime Boost Query.
Assuming you're using the edismax QueryParser, you can add the following to your Solr query:
q=Crystal&boost=bq:(Jewelry Ornament)
See http://wiki.apache.org/solr/ExtendedDisMax#bq_.28Boost_Query.29
I have a entity framework database first set up and I'm having issues getting data from a table EF treats as an association because it's basically a navigation property. I have a Survey table with an EventId(PK), FacilityId, ExitDate, and Status. I also have a SurveyCategories table with CategoryID(PK), Description and a SurvCat table that just has SurveyId and CategoryId as foreign keys. I can get data from other related tables that don't use a middle table like SurvCat, but even following the documentation from the breeze site for navigation properties I cannot get anything loaded into the SurveyCategories array in each Survey object. I checked the metadata and it's showing the navigation property but I get nothing with this code:
var query = EntityQuery.from('Surveys')
.where("facilityId", "eq", whereClause)
.skip(currentPage * 5).take(5)
.expand("Facility")
.expand("SurveyCategories")
.expand("SurveyCite")
.expand("SurveyDL")
.orderBy(orderBy.survey)
.inlineCount(true);
Any help or links would be greatly appreciated.
I think that the answer for this other question can help you tu solve the problem: Error Loading related entities on demand (entityAspect.loadNavigationProperty()).
The N to N relations are not supported in breeze, so you have to use a intermediate entity to do work this.