Hi Adam, Not a trivial question to answer. I can't recall similar cases, though I do have some experience with negated search queries. You have the not-query which might be of help here. It works in a counter-intuitive way, since it searches for any match within a fragment and returns true if none are found, which is not always what you expect if you put for instance a specific element-query inside it. Try what happens if you put your div level query in a not-query, and combine that with an and-query with the text level query. It might just work..
The fragmentation you described results in suitable sizes, and if div is indeed the most typical node level you want to search on, that would well. It is often easier to work with when you cut your document into small pieces literally, though. It comes with lot's of benefits, for instance when updating. It could also make solving your two level searching easier, as you could create additional ways to separate between text level and div level, for instance by physically separating them in different collections or directories. Kind regards, Geert > As to why I think I need fragmentation, I actually got the > idea from advice of people on this list. I had a problem > where I was searching and what I would consider to be a hit > was at the level of the <div> nodes in my example. But with > no fragmentation I could get many hits but the estimate on > the hits (which uses the fragments) would always be 1 > (because of the one fragment for my one document). So I would > always get funny results like my search would return "1 to 8 > hits of a total of 1 hit"...which of course makes no sense > and would confuse users. The suggested solution was to root > fragments at the level at which I was defining a hit. This > works perfectly except that, as I outline below I have two > levels, one nested inside the other, at which my search > defines a hit. I consider the <text> node level to be a hit > in certain situations and the <div> node level to be a hit > under other situations. I should probably mention that the > two different situations I've outlined are disjoint: there is > no overlap between the two searching situations. > > Adam > > On Apr 8, 2010 4:32 PM, "Adam Patterson" > > Now, I am trying to build a search which has two > scenarios: (1) It searches at the <div> level and considers a > fragment rooted at a <div> to be a hit if at least one match > occurs within the <div> node or one of its descendants; (2) > searches at the <text> level and considers a fragment rooted > at a <text> level to be a hit if at least one match occurs > within the <text> node or one of its descendants. Scenario > (1) is working well, but for scenario (2) my search is still > considering fragments rooted at the <div> level to be hits. > Is there any way to tell the search which level of fragment > to use for evaluation? > > In scenario (2) I don't want the <div> level fragments > to be considered hits. I want the higher level fragment, the > fragment rooted at the <text> level to be a hit. drs. G.P.H. (Geert) Josten Consultant Daidalos BV Hoekeindsehof 1-4 2665 JZ Bleiswijk T +31 (0)10 850 1200 F +31 (0)10 850 1199 mailto:[email protected] http://www.daidalos.nl/ KvK 27164984 P Please consider the environment before printing this mail. De informatie - verzonden in of met dit e-mailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
