sdx-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sdx-developers] Fragmenter une base de documents et un index Lucene


From: Pierrick Brihaye
Subject: Re: [sdx-developers] Fragmenter une base de documents et un index Lucene
Date: Thu, 15 Jul 2004 10:18:18 +0200
User-agent: Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.6) Gecko/20040113

Salut,

Emmanuel Bégué a écrit :

La seule chose un peu lourde dans la configuration actuelle c'est
de devoir répéter la liste des champs d'une base à une autre: si on
pouvait nommer la fieldlist et y faire référence dans application.xconf,
de mon point de vue ça serait largement suffisant... ;-)

Rien ne t'empêche de procéder à des inclusions (entités).

Sinon :

<element name = "fieldList">
  <complexType>
    <sequence>
      <element ref = "sdx:field" minOccurs= "0" maxOccurs = "unbounded"/>
    </sequence>
    <attributeGroup ref = "sdx:fields"/>
    <attribute name="ref" type="IDREF"/>
  </complexType>
</element>

... qui se concrétise ainsi dans LuceneDocumentBase :

protected void configureFieldList(Configuration configuration) throws ConfigurationException {
  try {
/*check for the ref attribute, if it exists, get the repository object and add it to the local hashtable *if the attribute doesn't exist create the repo like below, we also need to handle DEFAULTS with refs*/
    //getting the list of fields for indexing
Configuration l_fieldListConf = configuration.getChild(DocumentBase.ConfigurationNode.FIELD_LIST, true); String ref = l_fieldListConf.getAttribute(Repository.ConfigurationNode.REF, null);
    if (Utilities.checkString(ref)) {
Context appFieldLists = (Context) super.getContext().get(ContextKeys.SDX.Application.FIELD_LISTS);

et, surtout, ainsi dans Application :

/**The fieldList(s) defined at the application level*/
private DefaultContext _fieldLists = null;

protected void configureFieldLists(Configuration configuration) throws ConfigurationException { //at this point, we should have a <sdx:repositories> element containing a list of repositories
  //intializing the array
/*adding the repositories to this documentbase, must be done before documentBases are configured as global repos need to be provided to documentbases*/ String elemNameFieldLists = DocumentBase.ConfigurationNode.FIELD_LIST + "s"; Configuration[] fieldListConfList = new Configuration[configuration.getChild(elemNameFieldLists).getChildren(DocumentBase.ConfigurationNode.FIELD_LIST).length]; //getting an array of configuration objects from each of the <sdx:repository> subElements of <sdx:repositories> element fieldListConfList = configuration.getChild(elemNameFieldLists).getChildren(DocumentBase.ConfigurationNode.FIELD_LIST);

En clair, il semble être possibile de définir des FieldList globales au niveau de l'application, ce dont le schéma ne rend pas compte.

Probablement un peu de clarifications à faire autour de ça, ne serait-ce qu'un niveau des commentaires...

A+

--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:address@hidden
+33 (0)2 99 29 67 78




reply via email to

[Prev in Thread] Current Thread [Next in Thread]