Hello,
Since you want to match on document having the title=Test, you should
first of all not use d:contains.
You need:
<d:where>
<d:eq>
<d:prop><h:title/></d:prop>
<d:literal>Test</d:literal>
</d:eq>
</d:where>
I suppose you have the correct extractors set in your repository
configuration? In other words, if you want to query on h:title, you need
to define a HippoSimpleXmlExtractor with a correct xpath.
It's really simple, just take a look at [1] and [2] and you'll be an
expert
Do not forget when changing extractors, to touch (open->save) a document
to have the extractor run again. If you have a lot of documents, use a
batch processor
-Ard
[1]
http://www.hippocms.org/display/CMS/4.+Hippo+Repository+Configure+Extrac
tors#4.HippoRepositoryConfigureExtractors-nl.hippo.slide.extractor.Hippo
SimpleXmlExtractor
[2] http://www.hippocms.org/display/CMS/06.+Using+DASL+Queries
>
> 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