On 8/10/06, ma lan <[EMAIL PROTECTED]> wrote:
I tried to modify the lenyadocs.xconf, but it doesn't work well.
can you give me an sample?
for example :
<img src="myt.jpg" title="this is test"/>

how to config  so that the "title" attribute can be indexed ?
Michael Wechner <[EMAIL PROTECTED]> wrote:

ma lan wrote:
> lenya 1.2.4
> I hope lenya can search the attribute.


src/webapp/lenya/pubs/default/config/search/lenyadocs.xconf

whereas there is no attribute sample, but it shouldn't be too hard to
fix this in case it doesn't,
but please give it a try first.

From experience, when you specify a root element, the index does not
include elements and their attributes, but does include the values of
all child elements.  So if you index the "HTML" element, it returnes
all the values inside "B", "DIV", "I", "SPAN", and other elements.

Lucene uses XPath, so it should be able to include attributes, but
they would need to be specifically indexed.  Try:
  <luc:field name="contents" type="UnStored" xpath="/|//@title"/>
or
  <luc:field name="contents" type="UnStored" xpath="/|//xhtml:img/@title"/>

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to