[Yanel-dev] User management search implementation

Balz Schreier balz.schreier at gmail.com
Mon Apr 18 16:21:01 CEST 2011


hi,
I have now applied the configuration so that users should get searchable on
the User Mgmt page.
But no users appear at all. I even registered a new user (so that it gets
certainly indexed) but that didn't help either.

In general: is a reindexing necessary of the identites repository after
applying this configuration?

The Index is there, I can see it (fulltext and properties index).

Current config is:

   <?xml version="1.0"?>

<repository class="com.zwischengas.yarep.ZGVirtualFileSystemRepository">

  <name>identities</name>

  <splitpath depth="2" length="2" escape="+">

    <include path="/users/" /> <!-- trailing slash is required!! -->

    <include path="/aliases/" /> <!-- trailing slash is required!! -->

  </splitpath>


  <meta src="../access-control-meta"/>

  <content src="../access-control">

    <ignore pattern=".*\.yarep"/>

    <ignore pattern=".*\.svn"/>

    <ignore pattern=".*\.svn.*"/>

    <ignore pattern="\.svn"/>

    <ignore pattern="\.svn.*"/>

    <ignore pattern=".*\.DS_Store"/>

    <ignore pattern=".*\.swp"/>

  </content>


  <!-- Search index config -->

  <s:search-index

      xmlns:s="http://www.wyona.org/yarep/search/2.0"

      indexer-class="org.wyona.yarep.impl.search.lucene.LuceneIndexer"

      searcher-class="org.wyona.yarep.impl.search.lucene.LuceneSearcher">

    <index-location file="../../yarep-search/users-index"/>

    <repo-auto-index-fulltext boolean="true"/>

    <repo-auto-index-properties boolean="true"/>

    <lucene>

      <!-- <local-tika-config file="tika-config.xml"/> -->

      <fulltext-analyzer class=
"org.apache.lucene.analysis.standard.StandardAnalyzer"/>

      <property-analyzer class=
"org.apache.lucene.analysis.WhitespaceAnalyzer"/>

      <write-lock-timeout ms="3000"/>

    </lucene>

  </s:search-index>

</repository>

Cheers
Balz


On Wed, Jan 5, 2011 at 1:34 PM, Michael Wechner
<michael.wechner at wyona.com>wrote:

>  Hi Balz
>
>
> On 1/5/11 1:24 PM, Balz Schreier wrote:
>
> Hi Michael,
> do you have a wiki page showing the necessary configuration steps in a
> realm in order to make use of this new feature?
> because without any modification the user XMLs are not indexed.
>
>
> Have a look at
>
> src/realms/from-scratch-realm-template/config/ac-identities-repository.xml
>
> and update your custom config accordingly
>
>
>  I would also like to understand in a bit more detail what is going on
> under the hood:
> - is it using the same index as the default index from yanel?
>
>
> each repository can have its own index, but see below
>
>  if not, where is the index stored?
>
>
> this depends on your configuration, see again
>
> src/realms/from-scratch-realm-template/config/ac-identities-repository.xml
>
>  - can it affect the search functionality of the default index? i just
> want to be sure that search results from the default index do not contain
> user objects.
>
>
> if you do it as the from scratch realm does it, where each repository has
> its own index, then no
>
> HTH
>
> Michael
>
>
>  cheers
> balz
>
> On Tue, Dec 28, 2010 at 10:53 PM, Michael Wechner <
> michael.wechner at wyona.com> wrote:
>
>> Hi Cedric
>>
>> Thanks again for your patches. I have committed them with some minor
>> changes,
>> whereas I first had to fix the YarepItem class because it was not closing
>> the OutputStream
>> and hence the indexing was never triggered when updating a user.
>>
>> One can now test it at
>>
>>
>> http://127.0.0.1:8080/yanel/from-scratch-realm/yanel/admin/list-users.html?query=alice
>>
>> whereas you need to update/re-build Yanel first and then do some
>> modifications, by changing
>> for example the name of these two users
>>
>> http://127.0.0.1:8080/yanel/from-scratch-realm/yanel/users/lenya.html
>> http://127.0.0.1:8080/yanel/from-scratch-realm/yanel/users/alice.html
>>
>> The user interface needs some more work, but maybe we can collect some
>> feedback first
>> before we continue with more improvements.
>>
>> Thanks
>>
>> Michael
>>
>>
>> On 10/21/10 4:18 PM, Cedric Staub wrote:
>>
>>> Hello everyone
>>>
>>> In short: I built a search feature for the user management page.
>>>
>>> The current implementation of Yanel's user management resource does not
>>> support searching for users, which can be a bit annoying if you have a
>>> realm with a lot of users. Since Yarep already has an interface that
>>> allows to search for nodes, I built a search feature for the user
>>> management page on top of that.
>>>
>>> There is one limitation to this approach: The search feature is subject
>>> to the limitations of the underlying implementation, e.g. if your users
>>> repository does not support searching it won't work. I suggest the
>>> VirtualFileSystemRepository implementation, which can be configured to
>>> use a Lucene search index.
>>>
>>> Attached are a series of patches for review. If anyone has suggestions
>>> or ideas for improvements just reply to this email ;-). I plan to
>>> improve the code and do some more testing and then file a bug report
>>> later in order to get it commited.
>>>
>>> Have a nice day
>>> Cedric
>>>
>>
>>   --
>> Yanel-development mailing list Yanel-development at wyona.com
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>
>
>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20110418/01686fd0/attachment-0001.html>


More information about the Yanel-development mailing list