Thanks a lot to both of You I will look at it now,
Kind Regards, Denis Balog HintTech On Wed, Jun 4, 2008 at 3:14 PM, Jasha Joachimsthal <[EMAIL PROTECTED]> wrote: > Hi Denis, > > Your way of finding documents with title "Test" is rather inefficient. > First, create an extractor that extracts the content of > /document/content/title into a property. See [1] for configuring > extractors, use nl.hippo.slide.extractor.HippoSimpleXmlExtractor. > Don't forget to "touch" all your content when you add an extractor. > > Now it depends what you want. If you want an exact match, change the > where into > <d:where> > <d:and> > <d:not-is-collection/> > <d:eq> > <d:prop><h:title/></d:prop> > <d:literal>Test</d:literal> > </d:eq> > </d:and> > </d:where> > > If you want to find documents with a title that contains "test" but can > be "Subject about test documents", you'll have to configure more: > Index the "title" property as "TEXT" (set that in the indexer [2]). > <property namespace="http://hippo.nl/cms/1.0" name="title" > type="text" > analyzer="org.apache.lucene.analysis.standard.StandardAnalyzer"/> > > And change your query into: > <d:where> > <d:and> > <d:not-is-collection/> > <S:property-contains> > <d:prop><h:title/></d:prop> > <d:literal>*Test*</d:literal> > </S:property-contains> > </d:and> > </d:where> > > [1] > http://www.hippocms.org/display/CMS/4.+Hippo+Repository+Configure+Extrac > tors > [2] > http://www.hippocms.org/display/CMS/3.+Hippo+Repository+Configure+Namesp > aces > > > Regards, > > Jasha Joachimsthal > > www.onehippo.com > Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 > San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA > 94952-3329 +1 (707) 773-4646 > > > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> Denis Balog >> Sent: woensdag 4 juni 2008 15:04 >> To: Hippo CMS development public mailinglist >> Subject: [HippoCMS-dev] JSP+dasl+lucene >> >> Hi all, >> >> I'm trying to do some query search >> >> i have folder in repo >> ex. /default.preview/content/jobs/ >> >> there are a lot of xml files that describe some jobs simple example >> ------------------------------------------------------------- >> <?xml version="1.0" encoding="UTF-8" ?> >> <document > >> <meta> >> <id></id> >> <dateCreated>2006-12-06</dateCreated> >> </meta> >> <content> >> <title>Test</title> >> >> </content> >> -------------------------------------------------------------- >> >> I'm trynig to find to get all jobs(xml files) where is title >> (document.content.title) "Test" >> >> is this possible with dasl and lucene >> With this example I'm NOT getting anything >> >> jsp code extract and dasl >> >> ---------------------------------------------------------------- >> <c:set var="dochref" value="content/jobs" scope="request" /> >> <c:import url="dasl_get_resource.jspx" var="dasl" >> scope="page" /> >> <c:forEach >> items="${repository.fetchCollection['/'][dasl][true].documents}" >> var="coll"> >> <p>${coll.content.document.content.title }</p> >> >> ------------------------------------------------------------------- >> <d:searchrequest xmlns:d="DAV:" >> xmlns:slide="http://jakarta.apache.org/slide/" >> xmlns:h="http://hippo.nl/cms/1.0" > >> <d:basicsearch> >> <d:select> >> <d:prop> >> <h:caption/> >> <d:displayname/> >> <h:index/> >> <h:type/> >> <h:publicationDate/> >> <d:modificationdate/> >> <h:title/> >> </d:prop> >> </d:select> >> <d:from> >> <d:scope> >> <d:href>${dochref}</d:href> >> <d:depth>1</d:depth> >> </d:scope> >> </d:from> >> <d:where> >> <d:and> >> <d:contains>"Test"</d:contains> >> <d:not-is-collection/> >> </d:and> >> </d:where> >> <d:orderby> >> <d:order> >> <d:prop><h:index/></d:prop> >> <d:ascending/> >> </d:order> >> </d:orderby> >> </d:basicsearch> >> </d:searchrequest> >> >> >> >> Thanks in advance, >> >> Denis Balog >> >> HintTech >> ******************************************** >> Hippocms-dev: Hippo CMS development public mailinglist >> > ******************************************** > Hippocms-dev: Hippo CMS development public mailinglist > ******************************************** Hippocms-dev: Hippo CMS development public mailinglist
