EPrints Technical Mailing List Archive

Message: #05615


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Search form


Hello,

I would like create a search form combining compound subfields pointing to another dataset.

We have 3 compounds : creators, editors, contributors.

Each one has a subfield 'authid' which is an itemref pointing to the dataset author (with a unite_id field).

{
        name => 'creators',
        type => 'compound',
        multiple => 1,
        fields => [
                ...
                {
                        sub_name => 'authid',
                        type => 'itemref',
                        datasetid => 'author',
                        required => 1,
                },
                ...
        ],
}

Our form should allow querying on the "unite_id" field pointed to by each author value :

        - creators_authid.unite_id

  - editors_authid.unite_id
        - contributors_authid.unite_id




cfg.d/eprint_search_affiliation.pl

I tried this:
    {Meta_fields => [qw (creators_authid.unite_id editors_authid.unite_id contributors_authid.unite_id)], id => 'crd_auteur_uniteid' match => "EX"},

or this

    {Meta_fields => [qw (creators_authid.unite_id)], id => 'crd_auteur_uniteid' match => "EX"},
    {Meta_fields => [qw (editors_authid.unite_id)], id => 'crd_editors_uniteid' match => "EX"},
    {Meta_fields => [qw (contributors_authid.unite_id)], id => 'crd_contributors_uniteid' match => "EX"},

We want the search to combine the 3 fields this way : "creators OR editors OR contributors".
But we don't get the right results.

The
sql query generated doesn't look right.
It uses "author.unite_id" three times, with a join on creators but none on editors nor contributors :

                    AND(

                        `author` . `unite_id` = 'A0055'

                        OR `author` . `unite_id` = 'A0055'

                        OR `author` . `unite_id` = 'A0055'

                    )


Do you have an idea ?
How can I build the form to achieve my goal ?
Is it possible ?

Thank you for your response.
I am sorry for the bad english…

--

Josée Lessard

Documentaliste

Cirad-Dgdrs-Délégation à l'information scientifique et technique

TA 183/05 - Avenue Agropolis - 34398 Montpellier Cedex 5 (Tél: +33 4 67 61 57 37)