Shouldn'tit be://myProperty[not(preceding::myProperty/@id = current::@id )]/@id
Jasha Joachimsthal [email protected] - [email protected] www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 185 H Street, suite B, Petaluma CA 94952 +1 (707) 7734646 2009/8/26 Wouter Zelle <[email protected]> > Hi Jeroen, > > It was a typo. It fails with the ) in the correct place. > > Regards, > > Wouter > > On Wed, Aug 26, 2009 at 11:03, Jeroen Reijn <[email protected]> wrote: > > > Hi Wouter, > > > > this XPath appears to be invalid. because there is no closing ')'. Was > this > > a typo in your email? > > > > Regards, > > > > Jeroen > > > > > > Wouter Zelle wrote: > > > >> nl.hippo.slide.extractor.MultiValueXMLPropertyExtractor > >> > >> It fails when I do this: > >> > >> //myProperty[not(preceding::myProperty/@id = @id]/@id > >> > >> Regards, > >> > >> Wouter Zelle > >> > >> > >> On Wed, Aug 26, 2009 at 10:40, Jasha Joachimsthal < > >> [email protected]> wrote: > >> > >> 2009/8/26 Wouter Zelle <[email protected]> > >>> > >>> Hi Jasha, > >>>> > >>>> I had already done that, but it didn't work at first. Because you told > >>>> me > >>>> it > >>>> should work, I remade my documents and that seems to have fixed the > >>>> problem. > >>>> > >>> You need to trigger the new indexing. Either by touching the documents > or > >>> by > >>> deleting the index. That's why you didn't see the changes at first. > >>> > >>> > >>> It also appears that the FACETS method correctly ignores multiple > values > >>>> > >>> in > >>> > >>>> the same property. In other words, if you have a document with > >>>> "myProperty=value1, value1" , then it will only count value1 once for > >>>> > >>> this > >>> > >>>> document. That is a big relief, especially since there seems to be a > bug > >>>> > >>> in > >>> > >>>> the extractors, where you cannot use the preceding-sibling axis (to > >>>> > >>> filter > >>> > >>>> out duplicate values). If you do try to use it, you get this error in > >>>> the > >>>> Slide log: > >>>> > >>>> ERROR 2009-08-25 14:42:18 [fortress.slide.default] > >>>> java.lang.NoSuchMethodError: > >>>> > >>> org.jdom.Element.getParent()Lorg/jdom/Element; > >>> > >>>> Apparently, Slide is using JDOM to process the extractors. In JDOM > beta > >>>> > >>> 9, > >>> > >>>> the getParent() method returned an Element. From beta 10 and later, > the > >>>> method returns an object with the Parent interface. The original > method > >>>> > >>> is > >>> > >>>> still available though under the name getParentElement(). So the bug > can > >>>> > >>> be > >>> > >>>> fixed by changing the current 'getParent()' reference to > >>>> getParentElement(). > >>>> > >>>> Which extrator class are you using? The org.apache.slide ones have an > >>> older > >>> and more limited xpath support than the nl.hippo.slide ones. See [1] > for > >>> an > >>> overview of all extractors. > >>> > >>> [1] > >>> > >>> > >>> > http://wiki.onehippo.com/display/CMS/4.+Hippo+Repository+Configure+Extractors > >>> > >>> Jasha > >>> > >>> > >>> Regards, > >>>> > >>>> Wouter Zelle > >>>> > >>>> > >>>> On Tue, Aug 25, 2009 at 16:46, Jasha Joachimsthal < > >>>> [email protected]> wrote: > >>>> > >>>> 2009/8/25 Wouter Zelle <[email protected]> > >>>>> > >>>>> Hi guys, > >>>>>> > >>>>>> I've tested a FACETS call for a property with multiple values and I > >>>>>> > >>>>> get > >>> > >>>> this > >>>>>> result: > >>>>>> > >>>>>> <hippo:facets xmlns:hippo="http://hippo.nl/slide"> > >>>>>> <property xmlns="http://hippo.nl/cms/1.0"> > >>>>>> <hippo:value hits="1">value1</hippo:value> > >>>>>> <hippo:value hits="1">value1,value2</hippo:value> > >>>>>> </property> > >>>>>> </hippo:facets> > >>>>>> > >>>>>> Where I would like the query to split up the values for the > property, > >>>>>> > >>>>> so > >>>> > >>>>> you > >>>>>> get this result: > >>>>>> > >>>>>> <hippo:facets xmlns:hippo="http://hippo.nl/slide"> > >>>>>> <property xmlns="http://hippo.nl/cms/1.0"> > >>>>>> <hippo:value hits="2">value1</hippo:value> > >>>>>> <hippo:value hits="1">value2</hippo:value> > >>>>>> </property> > >>>>>> </hippo:facets> > >>>>>> > >>>>>> Is this possible, or am I out of luck? > >>>>>> > >>>>> > >>>>> It's your lucky day! Use a different analyzer for this property: > >>>>> <property > >>>>> > >>>>> > analyzer="nl.hippo.slide.index.analysis.LowercaseCommaSeparatedAnalyzer" > >>> > >>>> name="myCSVProperty" namespace="http://hippo.nl/cms/1.0" > type="text"/> > >>>>> > >>>>> Jasha > >>>>> > >>>>> > >>>>>> Regards, > >>>>>> > >>>>>> Wouter Zelle > >>>>>> ******************************************** > >>>>>> Hippocms-dev: Hippo CMS development public mailinglist > >>>>>> > >>>>>> Searchable archives can be found at: > >>>>>> MarkMail: http://hippocms-dev.markmail.org > >>>>>> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > >>>>>> > >>>>>> > >>>>>> ******************************************** > >>>>> Hippocms-dev: Hippo CMS development public mailinglist > >>>>> > >>>>> Searchable archives can be found at: > >>>>> MarkMail: http://hippocms-dev.markmail.org > >>>>> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > >>>>> > >>>>> > >>>>> ******************************************** > >>>> Hippocms-dev: Hippo CMS development public mailinglist > >>>> > >>>> Searchable archives can be found at: > >>>> MarkMail: http://hippocms-dev.markmail.org > >>>> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > >>>> > >>>> > >>>> ******************************************** > >>> Hippocms-dev: Hippo CMS development public mailinglist > >>> > >>> Searchable archives can be found at: > >>> MarkMail: http://hippocms-dev.markmail.org > >>> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > >>> > >>> > >>> ******************************************** > >> Hippocms-dev: Hippo CMS development public mailinglist > >> > >> Searchable archives can be found at: > >> MarkMail: http://hippocms-dev.markmail.org > >> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > >> > >> ******************************************** > > Hippocms-dev: Hippo CMS development public mailinglist > > > > Searchable archives can be found at: > > MarkMail: http://hippocms-dev.markmail.org > > Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > > > > > ******************************************** > Hippocms-dev: Hippo CMS development public mailinglist > > Searchable archives can be found at: > MarkMail: http://hippocms-dev.markmail.org > Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > > ******************************************** Hippocms-dev: Hippo CMS development public mailinglist Searchable archives can be found at: MarkMail: http://hippocms-dev.markmail.org Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
