http://docs.marklogic.com/cts:element-word-query
"min-occurs=*number*"Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1."max-occurs=*number*"Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. On Fri, Oct 12, 2012 at 3:24 PM, Marc Young <[email protected]> wrote: > Let's say i have 2 documents: > > <doc1> > <a>the dog</a> > <a>the cat</a> > <a>the human</a> > </doc1> > > and > > <doc2> > <a>the dog</a> > <a>foo</a> > <a>bar</a> > </doc2> > > Now for Marklogic, i want to search them for 'the' so I might run: > > search:search( > 'a:the', > <options xmlns="http://marklogic.com/appservices/search"> > <constraint name="a"> > <value> > <term-option>case-insensitive</term-option> > <element ns="" name="a"/> > </value> > </constraint> > </options> > ) > > this works, but returns both documents (which is what i asked for) But > what if I wanted only results that had more than 1 match on the > constraint... ie. 'give me the documents that have 2+ nodes with "the"' > > I have no idea where to start. Thanks! > > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
