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

[EP-tech] Re: [SOLVED] Re: How to set a field to be multilang (search)



Well, my training course page is coming together (I've been working on it today), and it has a section on troubleshooting searching already.  Perhaps you could add some notes to the page with the video on it.

--
Adam Field
Business Relationship Manager and Community Lead
EPrints Services
+44 (0)23 8059 8814





On 7 Oct 2015, at 15:11, George Mamalakis wrote:

> Ooops...indexer!?!??! :):)
> 
> Never heard of it!!!:)
> 
> OK, I corrected it. I tried to see what was happening in my system, and 
> my epindexer installation was missing a dependency:
> 
> # systemctl status epindexer.service
> epindexer.service - SYSV: Start the eprints indexer daemon as the 
> correct user
>    Loaded: loaded (/etc/init.d/epindexer)
>    Active: failed (Result: exit-code) since Wed 2015-10-07 16:42:25 
> EEST; 13s ago
>   Process: 6517 ExecStart=/etc/init.d/epindexer start (code=exited, 
> status=2)
> 
> Oct 07 16:42:25 pamak-e-prints epindexer[6517]: Can't locate 
> Config/General.pm in @INC (you may need to install the Config::General 
> module) (@INC contains: /etc/...
> Oct 07 16:42:25 pamak-e-prints epindexer[6517]: BEGIN 
> failed--compilation aborted at /etc/init.d/epindexer line 17.
> Oct 07 16:42:25 pamak-e-prints systemd[1]: epindexer.service: control 
> process exited, code=exited status=2
> Oct 07 16:42:25 pamak-e-prints systemd[1]: Failed to start SYSV: Start 
> the eprints indexer daemon as the correct user.
> Oct 07 16:42:25 pamak-e-prints systemd[1]: Unit epindexer.service 
> entered failed state.
> Hint: Some lines were ellipsized, use -l to show in full.
> 
> I installed the missing library and started epindexer:
> 
> # apt-get install libconfig-general-perl
> # service epindexer start
> # service epindexer status
> epindexer.service - SYSV: Start the eprints indexer daemon as the 
> correct user
>    Loaded: loaded (/etc/init.d/epindexer)
>    Active: active (running) since Wed 2015-10-07 16:50:43 EEST; 11s ago
>   Process: 7841 ExecStart=/etc/init.d/epindexer start (code=exited, 
> status=0/SUCCESS)
>    CGroup: /system.slice/epindexer.service
>            ??7843 indexer
>            ??7844 indexer
>            ??7846 /bin/cat
>            ??7901 sh -c \/usr\/bin\/pdftotext -enc UTF-8 -layout 
> \/usr\/share\/eprints3\/archives\/testpamak1\/documents\/disk0\/00\/00\/0...
>            ??7902 /usr/bin/pdftotext -enc UTF-8 -layout 
> /usr/share/eprints3/archives/testpamak1/documents/disk0/00/00/02/47/01/of_daemons_...
> 
> Oct 07 16:50:43 pamak-e-prints epindexer[7841]: Starting EPrints 
> Indexer:                                  [  OK  ]
> 
> So now, after making a change in one of my eprint's title, after a 
> minute or so, the search worked as expected!
> 
> But the problem is that this information was (and still is) missing from 
> the wiki wrt to EPrints installation in Debian. The package 
> libconfig-general-perl should be added in the dependencies section!
> 
> Thanks again!
> 
> 
> On 07/10/2015 03:45 ??, Field A.N. wrote:
>> Hi George
>> 
>> 	It doesn't look like you've done anything wrong.  For it to show up in the searches, the field has to have been indexed.  What do you mean by 'manually reindex'?  Is your indexer running well?  Is it indexing the ml fields?
>> 
>> --
>> Adam Field
>> Business Relationship Manager and Community Lead
>> EPrints Services
>> +44 (0)23 8059 8814
>> 
>> 
>> 
>> 
>> 
>> On 6 Oct 2015, at 11:29, George Mamalakis wrote:
>> 
>>> Hi all,
>>> 
>>> As promised, I'm back with the search within multilang fields:). My
>>> problem is that it seems that I cannot search correctly within my
>>> multilingual title and abstract fields (ml_title and ml_abstract
>>> respectively), unless my dataset is reindexed manually.
>>> 
>>> What I've done so far is the following: I've added a script for each
>>> type of search (advanced and simple) that basically replaces the
>>> original fields with their multilingual counterparts. So I've added
>>> archives/myrepo/cfg/cfg.d/eprint_search_advanced_local.pl:
>>> 
>>> $c->{search}->{advanced} =
>>> {
>>>     search_fields => [
>>>         { meta_fields => [ "documents" ] },
>>>         { meta_fields => [ "ml_title" ] },
>>>         { meta_fields => [ "creators_name" ] },
>>>         { meta_fields => [ "ml_abstract" ] },
>>>         { meta_fields => [ "date" ] },
>>>         { meta_fields => [ "collection" ] },
>>>         { meta_fields => [ "keywords" ] },
>>>         { meta_fields => [ "subjects" ] },
>>>         { meta_fields => [ "type" ] },
>>>         { meta_fields => [ "department" ] },
>>>         { meta_fields => [ "editors_name" ] },
>>>         { meta_fields => [ "ispublished" ] },
>>>         { meta_fields => [ "refereed" ] },
>>>         { meta_fields => [ "publication" ] },
>>>         { meta_fields => [ "documents.format" ] },
>>>     ],
>>>     preamble_phrase => "cgi/advsearch:preamble",
>>>     title_phrase => "cgi/advsearch:adv_search",
>>>     citation => "result",
>>>     page_size => 20,
>>>     order_methods => {
>>>         "byyear"     => "-date/creators_name/title",
>>>         "byyearoldest"   => "date/creators_name/title",
>>>         "byname"     => "creators_name/-date/title",
>>>         "bytitle"    => "title/creators_name/-date"
>>>     },
>>>     default_order => "byyear",
>>>     show_zero_results => 1,
>>> };
>>> 
>>> and archives/testpamak1/cfg/cfg.d/eprint_search_simple_local.pl:
>>> 
>>> $c->{search}->{simple} =
>>> {
>>>     search_fields => [
>>>         {
>>>             id => "q",
>>>             meta_fields => [
>>>                 "documents",
>>>                 "ml_title",
>>>                 "ml_abstract",
>>>                 "creators_name",
>>>                 "date"
>>>             ]
>>>         },
>>>     ],
>>> #   preamble_phrase => "cgi/search:preamble",
>>>     title_phrase => "cgi/search:simple_search",
>>>     citation => "result",
>>>     page_size => 20,
>>>     order_methods => {
>>>         "byyear"     => "-date/creators_name/title",
>>>         "byyearoldest"   => "date/creators_name/title",
>>>         "byname"     => "creators_name/-date/title",
>>>         "bytitle"    => "title/creators_name/-date"
>>>     },
>>>     default_order => "byyear",
>>>     show_zero_results => 1,
>>> };
>>> 
>>> 
>>> When I search for a keyword which exists in one of my deposits' ml_title
>>> field, both search functions return nothing, unless I manually reindex
>>> my dataset. After that, searches work as expected.
>>> 
>>> What exactly am I doing wrong and needs to be taken care of?
>>> 
>>> Thanks all in advance!
>>> 
>>> George.
>>> 
>>> -- 
>>> George Mamalakis
>>> 
>>> IT and Security Officer,
>>> Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
>>> PhD (Aristotle Univ. of Thessaloniki),
>>> MSc (Imperial College of London)
>>> 
>>> School of Electrical and Computer Engineering
>>> Aristotle University of Thessaloniki
>>> 
>>> phone number : +30 (2310) 994379
>>> 
>>> 
>>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>> *** Archive: http://www.eprints.org/tech.php/
>>> *** EPrints community wiki: http://wiki.eprints.org/
>>> *** EPrints developers Forum: http://forum.eprints.org/
>> 
>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** Archive: http://www.eprints.org/tech.php/
>> *** EPrints community wiki: http://wiki.eprints.org/
>> *** EPrints developers Forum: http://forum.eprints.org/
> 
> 
> -- 
> George Mamalakis
> 
> IT and Security Officer,
> Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
> PhD (Aristotle Univ. of Thessaloniki),
> MSc (Imperial College of London)
> 
> School of Electrical and Computer Engineering
> Aristotle University of Thessaloniki
> 
> phone number : +30 (2310) 994379
> 
> 
> 
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/