[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sdx-developers] le préfix dans la classe "Luce neTermHighlighter" - htt
From: |
Rasik Pandey |
Subject: |
[sdx-developers] le préfix dans la classe "Luce neTermHighlighter" - http:hilites |
Date: |
Tue, 3 Feb 2004 17:48:17 +0100 |
Salut,
J'ai trouvé le problème de "http:hilites". Pierrick, pourrait-tu le corriger,
il fallait utiliser Framework.SDXNamespacePrefix au lieu de
Framework.SDXNamespaceURI ;)...
A+
Index: LuceneTermHighlighter.java
===================================================================
RCS file:
/cvsroot/sdx/sdx_v2/src/java/fr/gouv/culture/sdx/search/lucene/highlight/LuceneTermHighlighter.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -w -r1.28 -r1.29
333,334c333,349
< // Utilities.logDebug(logger, ((Term)list.next()).text(),
null);
< this.xmlConsumer.startElement(this.uri,
Node.Name.HIGHLIGHT_TERMS, "sdx:" + Node.Name.HIGHLIGHT_TERMS, new
AttributesImpl());
---
> AttributesImpl topAtts = new AttributesImpl();
> //TODO : factorize analyzer instanciation in
> this class -pb
> //This could be done by getting the default
> field's analyzer in a constructor
> //And to provide a setAnalyzer method that
> could be used by the highlighting pipeline
> try {
> if (this.sLocs != null) {
>
> fr.gouv.culture.sdx.search.lucene.analysis.Analyzer analyzer = null;
> Field df =
> this.sLocs.getDefaultField();
> if (df != null) analyzer =
> df.getAnalyzer();
> if (analyzer!= null)
>
> topAtts.addAttribute("", Node.Name.ANALYZER_CLASS, Node.Name.ANALYZER_CLASS,
> Node.Type.CDATA, analyzer.getClass().getName());
> }
> } catch (SDXException e) {
> topAtts.addAttribute("",
> Node.Name.ANALYZER_CLASS, Node.Name.ANALYZER_CLASS, Node.Type.CDATA, "unable
> to get an analyzer");
> }
>
> this.xmlConsumer.startElement(this.uri,
> Node.Name.HIGHLIGHT_TERMS, Framework.SDXNamespaceURI + ":" +
> Node.Name.HIGHLIGHT_TERMS, topAtts);
348c363
< this.xmlConsumer.endElement(this.uri,
Node.Name.HIGHLIGHT_TERMS, "sdx:" + Node.Name.HIGHLIGHT_TERMS);
---
> this.xmlConsumer.endElement(this.uri,
> Node.Name.HIGHLIGHT_TERMS, Framework.SDXNamespaceURI + ":" +
> Node.Name.HIGHLIGHT_TERMS);
460d474
<
- [sdx-developers] le préfix dans la classe "Luce neTermHighlighter" - http:hilites,
Rasik Pandey <=