From: Joe W. <jo...@gm...> - 2012-02-16 14:32:34
|
Michael, In your sample XML Field1 is not in the ns: namespace, but in your xconf file you have the ns: prefix. I'd suggest double checking that your namespaces are in alignment. Cheers, Joe On Thu, Feb 16, 2012 at 9:23 AM, Michael Gatzonis <eph...@gm...> wrote: > Hi to all, > > I have a question on how the lucene search syntax works > Consider the following queries that should(?) return the same results: > > 1. > for $m1 in collection('/db/coll/')//ns:mynamespace[ft:query(.,'sterm')] > [Field1= 'sterm1'] > order by $m1/sField ascending return $m1 > > 2. > for $m1 in collection('/db/coll/')//ns:mynamespace[ft:query(.,'sterm')] > [ft:query(Field1,'sterm1')] order by $m1/sField ascending return $m1 > > query 1 works well, but query 2 returns nothing > > My XML : > <ns:mynamespace> > <field1>something</field1> > <sField>something</sField> > <ns:mynamespace> > > This is how my xconf for the collection is configured: > <lucene> > <analyzer > class="org.apache.lucene.analysis.standard.StandardAnalyzer"/> > <analyzer id="ws" > class="org.apache.lucene.analysis.WhitespaceAnalyzer"/> > <text qname="ns:mynamespace"/> > <text qname="ns:Field1"/> > </lucene> > > It seems that [ft:query..] cannot appear two (or more) times in a row. > Do I need to query it explicitly ? Like... > > for $m1 in collection('/db/coll/')//ns:mynamespace[Field1= 'sterm1'] > [ft:query(.,'sterm')] and //ns:mynamespace/[ft:query(Field2,'sterm2')] order > by $m1/sField ascending return $m1 > > Thanks > Michael > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |