i've experimented a bit with some search i'm creating atm. And i would like to keep it in examine, but im not sure if examine is flexible enough for me to be able to create the query that i want. I've created this query in Luke, and it seems to do what i want, but i can't seem to figure out how to create it in examine, hopefully some of you can guide me in the right direction :)
This is my Query : +((+nodeTypeAlias:user^7.7 +(fullName:niclas* fullName:schumacher* fullName:niclas fullName:schumacher))
The point is that i want to search differently depending on the documentType. So i could have a workGroup also, which could look something like :
So this query would search for users and workgroups, but search in their respected fields, and give me a result back containing both documentTypes (depending on the search query, in this example: Niclas Schumacher)
I can't quite figure out how to do such a query in examine, the only methods i find usefull is Field(), And(), Or(), GroupedOr()/and(). - And these can't make a query look like i want it to :(
I hope some of you could help me clearfy this, or if i just should use Lucene directly, though i think examine look nicer :)
The whole point of the raw query was to give searchers the options of querying when the fluent api could not generate the query, for most queries you can get away with api but there will be exceptions when you need the raw query.
How to make query in Examine
Hello search people!
i've experimented a bit with some search i'm creating atm. And i would like to keep it in examine, but im not sure if examine is flexible enough for me to be able to create the query that i want.
I've created this query in Luke, and it seems to do what i want, but i can't seem to figure out how to create it in examine, hopefully some of you can guide me in the right direction :)
This is my Query : +((+nodeTypeAlias:user^7.7 +(fullName:niclas* fullName:schumacher* fullName:niclas fullName:schumacher))
The point is that i want to search differently depending on the documentType. So i could have a workGroup also, which could look something like :
+((+nodeTypeAlias:user^7.7 +(fullName:niclas* fullName:schumacher* fullName:niclas fullName:schumacher)) (nodeTypeAlias:workgroup title:niclas* title:schumacher* title:niclas title:schumacher))
So this query would search for users and workgroups, but search in their respected fields, and give me a result back containing both documentTypes (depending on the search query, in this example: Niclas Schumacher)
I can't quite figure out how to do such a query in examine, the only methods i find usefull is Field(), And(), Or(), GroupedOr()/and(). - And these can't make a query look like i want it to :(
I hope some of you could help me clearfy this, or if i just should use Lucene directly, though i think examine look nicer :)
Niclas,
The whole point of the raw query was to give searchers the options of querying when the fluent api could not generate the query, for most queries you can get away with api but there will be exceptions when you need the raw query.
Regards
Ismail
Ismail,
yes. But, im just just not sure that this is a case which needs rawQuery, or is it possible to do with examine?
is working on a reply...