xpathSelect="dc:title"

I am using lucene index for the full text search in my application. I want to enhance the code to search the files using 憈itle of the file?(title search).

I think i need to make the changes in 憀iusFilesConfig.xml?file. The code for same is as follows. I tried to use the xpathSelect=攄c:title?for this, but it抯 not working.

Configuration file (liusFilesConfig.xml)

>>>

<?xml version="1.0" encoding="UTF-8"?>

<luceneIndex>

<!-- org.apache.lucene.analysis.StopAnalyzer -->

<!-- org.apache.lucene.analysis.SimpleAnalyzer-->

<!-- org.apache.lucene.analysis.standard.StandardAnalyzer-->

<!-- org.apache.lucene.analysis.WhitespaceAnalyzer-->

<!-- org.apache.lucene.analysis.fr.FrenchAnalyzer-->

<!-- org.apache.lucene.analysis.cjk.CJKAnalyzer-->

<!-- org.apache.lucene.analysis.cn.ChineseAnalyzer-->

<!-- org.apache.lucene.analysis.cz.CzechAnalyzer-->

<!-- org.apache.lucene.analysis.ru.RussianAnalyzer-->

<properties>

<analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>

<createIndex value="auto"/>

<indexWriterProperty mergeFactor="10" maxMergeDocs="100" optimize="true"/>

<loggerProperties>config/log4j.properties</loggerProperties>

</properties>

<index>

<xml>

<xmlFile ns="http://purl.org/dc/elements/1.1/" setBoost="2.0">

</xmlFile>

<xmlFile ns="http://www.ndltd.org/standards/metadata/etdms/1.0/">

</xmlFile>

<xmlFile ns="default" setBoost="0.5">

<luceneField name="fullText" xpathSelect="//*" type="UnStored" ocurSep="|"/>

</xmlFile>

</xml>

<msWord setBoost="1.2">

<luceneField name="fullText" get="content" type="UnStored"/>

</msWord>

<msExcel setBoost="1.3">

<luceneField name="fullText" get="content" type="Text"/>

</msExcel>

<msPowerPoint setBoost="0.2">

<luceneField name="fullText" get="content" type="Text"/>

</msPowerPoint>

<html setBoost="1.4">

<luceneField name="fullText" xpathSelect="//*" type="Text" ocurSep="|" />

</html>

<rtf setBoost="1.5">

<luceneField name="fullText" get="content" type="Text"/>

</rtf>

<pdf setBoost="1.6">

<luceneField name="fullText" get="content" type="UnStored"/>

</pdf>

<txt setBoost="0.1">

<luceneField name="fullText" get="content" type="Text"/>

</txt>

<openOffice setBoost="1.6">

<luceneField name="fullText" xpathSelect="//office:body//*" type="Text" ocurSep=" " />

</openOffice>

<mp3>

<luceneField name="channels" get="channels" type="Text"/>

<luceneField name="channelsmode" get="channelsmode" type="Text"/>

<luceneField name="version" get="version" type="Text"/>

<luceneField name="samplingrate" get="samplingrate" type="Text"/>

<luceneField name="layer" get="layer" type="Text"/>

<luceneField name="emphasis" get="emphasis" type="Text"/>

<luceneField name="nominalbitrate" get="nominalbitrate" type="Text"/>

<luceneField name="duration" get="duration" type="Text"/>

<luceneField name="location" get="location" type="Text"/>

<luceneField name="size" get="size" type="Text"/>

<luceneField name="copyright" get="copyright" type="Text"/>

<luceneField name="crc" get="crc" type="Text"/>

<luceneField name="original" get="original" type="Text"/>

<luceneField name="vbr" get="vbr" type="Text"/>

<luceneField name="track" get="track" type="Text"/>

<luceneField name="year" get="year" type="Text"/>

<luceneField name="genre" get="genre" type="Text"/>

<luceneField name="title" get="title" type="Text"/>

<luceneField name="artist" get="artist" type="Text"/>

<luceneField name="album" get="album" type="Text"/>

<luceneField name="comments" get="comments" type="Text"/>

</mp3>

</index>

<search>

<!--If you want tosearch the field addit in the element searchFields -->

<multiFieldQueryParser>

<searchFields sep=",">title,subject,creator,description,publisher,contributor,fullText</searchFields>

</multiFieldQueryParser>

</search>

<searchResult>

<fieldsToDisplay setHighlighter="false"> <!--true <=> PB -->

<luceneField name="path" label="CheminDuFichier" />

<luceneField name="date" label="DateFichier" />

<luceneField name="taille" label="TailleFichier" />

</fieldsToDisplay>

</searchResult>

</luceneIndex>

Please advice.

Thanks in advance

Message was edited by:

prachis

[8243 byte] By [prachisa] at [2007-11-27 0:27:21]
# 1
I don't see any Java code there. Can you show us the part of your Java code where you explain to the XPath object what the "dc" namespace prefix means?
DrClapa at 2007-7-11 22:27:00 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...