docs.Places.Select(p => new {
Query = new object[] {
p.__document_id,
p.translatedName,
p.name,
p.nickNames,
p.categories.Select(x => x.name),
p.location.city,
p.location.state,
p.location.address
},
Tags = p.tags,
Categories_Id = p.categories.Select(x => x.id),
_ = SpatialIndex.Generate(((double ? ) p.location.lat), ((double ? ) p.location.lng))
})
var query = RavenSession.Advanced.AsyncLuceneQuery<Place>("PlacesByQuery")
.Statistics(out stats)
.WithinRadiusOf(distance, lat, lng);
foreach (var tag in tagList) {
query.AndAlso().Search("Tags", tag);
}
query.AndAlso().OpenSubclause().Search("Query", keyword).CloseSubclause();
query.AndAlso().WhereIn("Categories_Id", categoryList);
query.Skip(0).Take(25);
var places = await query.ToListAsync();
var query = RavenSession.Advanced.AsyncLuceneQuery<Place>("PlacesByQuery")
.Statistics(out stats)
.WithinRadiusOf(distance, lat, lng);
foreach (var tag in tagList) {
query.AndAlso().Search("Tags", tag);
}
query.Skip(0).Take(25);
var places = await query.ToListAsync();
query.AndAlso().WhereIn("Tags", tagList);
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
@in<Tags>:("kid friendly","date spot") AND ( Query:(demode)) AND @in<Categories_Id>:(4bf58dd8d48988d14e941735)
@in<Tags>:("kid friendly") AND @in<Tags>:("date spot") AND ( Query:(demode)) AND @in<Categories_Id>:(4bf58dd8d48988d14e941735)
string Place {
string Id;
string name;
List<string> tags;
List<Category> categories;
Location location;
...
}
docs.Places.Select(p => new {
Query = new object[] {
p.name,
p.categories.Select(x => x.name)
},
Tags = p.tags,
Categories_Id = p.categories.Select(x => x.id),
_ = SpatialIndex.Generate(((double ? ) p.location.lat), ((double ? ) p.location.lng))
})
@in<Tags>:("kid friendly") AND @in<Tags>:("smoke free") AND ( Query:(cheese*)) AND @in<Categories_Id>:(4bf58dd8d48988d1c5941735)
@in<Tags>:("kid friendly") AND ( Query:(cheese*)) AND @in<Categories_Id>:(4bf58dd8d48988d1c5941735)
@in<Tags>:(kidFriendly) AND @in<Tags>:(englishFriendly) AND @in<Categories_Id>:(4bf58dd8d48988d1c5941735) SpatialField: __spatial QueryShape: Circle(139.349905 35.745064 d=25.000000) Relation: Within
@in<Categories_Id>:(4bf58dd8d48988d1bd941735) AND @in<Tags>:(kidFriendly) AND @in<Tags>:(englishFriendly)
var query = RavenSession.Advanced.AsyncLuceneQuery<Place>("PlacesByQuery").WithinRadiusOf(distance, lat, lng);
query.AndAlso().WhereIn("Categories_Id", new List<string> { cat });
foreach (var tag in tagList) {
query.AndAlso().WhereIn("Tags", new List<string> { tag });
}
var places = await query.ToListAsync();
@in<Categories_Id>:(4bf58dd8d48988d1c5941735) AND @in<Tags>:(englishFriendly) AND @in<Tags>:(kidFriendly)
SpatialField: __spatial QueryShape: Circle(139.349905 35.745064 d=25.000000) Relation: Within
--
Ah, didn't know that. Re-ran the query using the UI, but got the same results.When checking the spatial checkbox, the fields cover up the main part of the query... so I included the bottom of the studio where it shows the http code of the query.
--
--
Actually here's a dump of the DB. It's small... not much in there, dev only.
--
--
If you have time, sure. I have the code, and RavenStudio, up now.
--