Re: Probleme lucene

"Khue Nguyen" <[email protected]>
Newsgroups gmane.comp.cms.jahia.devel
Message-ID <000501c58c40$ab45ef90$7c02a8c0@SINGASONG>
Hi,

great!

Can you please reply to the dev_list as it can be a help for other people 
too ?

Thank you.

Regards,
Khue Nguyen


----- Original Message ----- 
From: "Nicolas Lafaury" <[email protected]>
To: "Khue Nguyen" <[email protected]>
Sent: Tuesday, July 19, 2005 10:54 AM
Subject: RE : Probleme lucene


Hi

Thanks for your help, my research is working now.

Nicolas

-----Message d'origine-----
De : Khue Nguyen [mailto:[email protected]]
Envoyé : lundi 18 juillet 2005 18:06
À : Nicolas Lafaury
Objet : Re: Probleme lucene

Hi,


for Jahia 4.1, this is the repository jahia + tag JAHIA-4-1-BRANCH.
for Jahia 4.0.5, this is the repository jahia + tag JAHIA-4-0-BRANCH.

The change involves two classes  :

org.jahia.services.containers.ContainerFactory.java and
org.jahia.services.search.ChainedJahiaSearcher.java

Khue


----- Original Message ----- 
From: "Nicolas Lafaury" <[email protected]>
To: <[email protected]>
Sent: Monday, July 18, 2005 5:53 PM
Subject: RE : Probleme lucene


Hello

Thanks for your answer.
Can you just tell me where in CVS I can find your class and where I should
put it.

Nicolas

-----Message d'origine-----
De : Khue Nguyen [mailto:[email protected]]
Envoyé : lundi 18 juillet 2005 16:59
À : [email protected]
Objet : Re: Probleme lucene

Hi,

please, see below the response given to one of our customer about similar
issue.

Regards,
Khue Nguyen



>----- Original Message ----- 
>From: Khue Nguyen
>To: [email protected]
>Sent: Tuesday, July 05, 2005 11:36 AM
>Subject: Re: About Lucene query


>Hello Alessandro,


>unfortunately none of these queries actually work because the unit of
>indexation is field, not container nor page.
>We may index by container as well in future refactoring of the search
>engine.

>At least, I just added to the cvs ( last version of jahia 4.0.6 and jahia
>4.1), a ChainedJahiaSearcher class that allow you to combine and, or, xor
>logics  >((a or b) and c) ... between several searchers, so that you can
>search on several fields of a same container. What you are trying to do.
>Note that there is a org.jahia.data.containers.ContainerChainedFilter that
>works in the same way but for Container filters ( only with last version of
>Jahia >4.1 ).

>Below is an example of search performed on the firstname field and lastname
>field of the people container.

> // first name searcher
> String firstNameQuery = "toto AND fieldname:firsname";
> ContainerSearcher firstNameSearcher =
> new ContainerSearcher("directoryPeopleContainer",jParams,firstNameQuery
> ,jParams.getEntryLoadRequest());

> // last name searcher
> String lastNameQuery = "mc* AND fieldname:lastname";
> ContainerSearcher lastNameSearcher =
> new ContainerSearcher("directoryPeopleContainer",jParams,lastNameQuery
> ,jParams.getEntryLoadRequest());

> // chaining searcher
> ChainedJahiaSearcher chainedSearcher = new ChainedJahiaSearcher(
>  new
> JahiaSearcher[]{firstNameSearcher,lastNameSearcher},ChainedJahiaSearcher.AND);
> // may be OR, ANDNOT, XOR, ...
> request.setAttribute("directoryPeopleContainer_search_handler",chainedSearcher);





----- Original Message ----- 
From: "Nicolas Lafaury" <[email protected]>
To: <[email protected]>
Sent: Monday, July 18, 2005 3:40 PM
Subject: Probleme lucene


Hi all

I want search a name in a particular field.

This is my containerList definition.


<content:declareContainerList name='myLuceneContainerList'
  title="myContainerList"
>
  <content:declareContainer>
    <content:declareField name='number'
      title="number"
      type="SmallText"
    />
    <content:declareField name='title'
      title="title"
      type="SmallText"
    />
  </content:declareContainer>
</content:declareContainerList>


I want retrieve all containers where the field "title" is equal to
"Hello".

The syntax to search is :

Hello AND fieldname: title.

But my problem is how I can find all containers where the field "number"
is equals to "2" and the field "title" is equal to "hello".

Is anyone has a idea?

Thanks.

Nicolas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.