You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by ma lan <ma...@yahoo.com> on 2006/08/10 03:31:01 UTC

how to search customized doc type ?

anybody help me?
  /////////////
  HI,
   
  Mydoc type is like that :
   
  <xhml:body>
  <xhtml:catelog name="new1">fishcontents</xhtml:catelog>
  .........
  <xhtml:catelog name="pop1">somethingds</xhtml:catelog>
  ............
  <xhtml:catelog name="somethingelse1">dfjkdjfkdjfd</xhtml:catelog>
  ....
   
  </xhmt:body>
   
   
  I want to use the lucene to index & search the name attribute? (for example, I want to search "new1")How can I do?
   
  Seems all the tags have been moved now,so no result return.
   
  Thanks a lot

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: how to search customized doc type ?

Posted by ma lan <ma...@yahoo.com>.
Thanks for your help.
   
  I configed lenyadocs.xconf.
 Unforunately, It doesn't work.
   
  Anything else I can do? 
  

solprovider@apache.org wrote:
  On 8/10/06, ma lan wrote:
> I tried to modify the lenyadocs.xconf, but it doesn't work well.
> can you give me an sample?
> for example :
> 
>
> how to config so that the "title" attribute can be indexed ?
> Michael Wechner 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:

or


solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org



 		
---------------------------------
Get your email and more, right on the  new Yahoo.com 

Re: how to search customized doc type ?

Posted by so...@apache.org.
On 8/10/06, ma lan <ma...@yahoo.com> 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 <mi...@wyona.com> 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: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to search customized doc type ?

Posted by ma lan <ma...@yahoo.com>.
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 ?
   
  thanks 
  


Michael Wechner <mi...@wyona.com> 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.

HTH

Michi

> 
> thanks a lot
>
> */Michael Wechner /* wrote:
>
> what version of Lenya are you using?
>
> Michi
>
> ma lan wrote:
>
> > anybody help me?
> > /////////////
> > HI,
> >
> > Mydoc type is like that :
> >
> >
> > fishcontents
> > .........
> > somethingds
> > ............
> > dfjkdjfkdjfd
> > ....
> >
> >
> >
> >
> > I want to use the lucene to index & search the *name* attribute?
> (for
> > example, I want to search "new1")How can I do?
> >
> > Seems all the tags have been moved now,so no result return.
> >
> > Thanks a lot
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>
>
> -- 
> Michael Wechner
> Wyona - Open Source Content Management - Apache Lenya
> http://www.wyona.com http://lenya.apache.org
> michael.wechner@wyona.com michi@apache.org
> +41 44 272 91 61
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Next-gen email? Have it all with the all-new Yahoo! Mail Beta. 
> 




-- 
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org



 		
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.

Re: how to search customized doc type ?

Posted by Michael Wechner <mi...@wyona.com>.
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.

HTH

Michi

>  
> thanks a lot
>
> */Michael Wechner <mi...@wyona.com>/* wrote:
>
>     what version of Lenya are you using?
>
>     Michi
>
>     ma lan wrote:
>
>     > anybody help me?
>     > /////////////
>     > HI,
>     >
>     > Mydoc type is like that :
>     >
>     >
>     > fishcontents
>     > .........
>     > somethingds
>     > ............
>     > dfjkdjfkdjfd
>     > ....
>     >
>     >
>     >
>     >
>     > I want to use the lucene to index & search the *name* attribute?
>     (for
>     > example, I want to search "new1")How can I do?
>     >
>     > Seems all the tags have been moved now,so no result return.
>     >
>     > Thanks a lot
>     >
>     > __________________________________________________
>     > Do You Yahoo!?
>     > Tired of spam? Yahoo! Mail has the best spam protection around
>     > http://mail.yahoo.com
>     >
>
>
>     -- 
>     Michael Wechner
>     Wyona - Open Source Content Management - Apache Lenya
>     http://www.wyona.com http://lenya.apache.org
>     michael.wechner@wyona.com michi@apache.org
>     +41 44 272 91 61
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>     For additional commands, e-mail: user-help@lenya.apache.org
>
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Next-gen email? Have it all with the all-new Yahoo! Mail Beta. 
> <http://us.rd.yahoo.com/evt=42241/*http://advision.webevents.yahoo.com/handraisers> 




-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to search customized doc type ?

Posted by ma lan <ma...@yahoo.com>.
lenya 1.2.4
   
  I hope lenya can search the attribute.
   
  thanks a lot 

Michael Wechner <mi...@wyona.com> wrote:
  what version of Lenya are you using?

Michi

ma lan wrote:

> anybody help me?
> /////////////
> HI,
> 
> Mydoc type is like that :
> 
> 
> fishcontents
> .........
> somethingds
> ............
> dfjkdjfkdjfd
> ....
> 
> 
> 
> 
> I want to use the lucene to index & search the *name* attribute? (for 
> example, I want to search "new1")How can I do?
> 
> Seems all the tags have been moved now,so no result return.
> 
> Thanks a lot
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>


-- 
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org



 		
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.

Re: how to search customized doc type ?

Posted by Michael Wechner <mi...@wyona.com>.
what version of Lenya are you using?

Michi

ma lan wrote:

> anybody help me?
> /////////////
> HI,
>  
> Mydoc type is like that :
>  
> <xhml:body>
> <xhtml:catelog name="new1">fishcontents</xhtml:catelog>
> .........
> <xhtml:catelog name="pop1">somethingds</xhtml:catelog>
> ............
> <xhtml:catelog name="somethingelse1">dfjkdjfkdjfd</xhtml:catelog>
> ....
>  
> </xhmt:body>
>  
>  
> I want to use the lucene to index & search the *name* attribute? (for 
> example, I want to search "new1")How can I do?
>  
> Seems all the tags have been moved now,so no result return.
>  
> Thanks a lot
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org