From: Demian K. <dem...@vi...> - 2013-09-24 14:09:02
|
YAML is very sensitive about spacing -- this is a lesson learned from hard experience. :-) - Demian > -----Original Message----- > From: Christian Dabrowski [mailto:dab...@fh...] > Sent: Tuesday, September 24, 2013 10:08 AM > To: Demian Katz > Cc: vufind-tech > Subject: Re: [VuFind-Tech] relevance ranking - Warning: Illegal offset type > > it worked - thank you Demian! > > I am amazed what you have to look at while debugging. Thanks for the hint! > > Christian > > > > Am 24.09.2013 16:03, schrieb Demian Katz: > > It looks like your QueryFields: label is indented two spaces too far. > > > > - Demian > > > >> -----Original Message----- > >> From: Christian Dabrowski [mailto:dab...@fh...] > >> Sent: Tuesday, September 24, 2013 9:55 AM > >> To: Demian Katz > >> Cc: vufind-tech > >> Subject: Re: [VuFind-Tech] relevance ranking - Warning: Illegal offset type > >> > >> Demian, > >> > >> sure, the search specs for allfields Section is: > >> > >> AllFields: > >> DismaxFields: > >> - title_short^750 > >> - title_full_unstemmed^600 > >> - title_full^400 > >> - title^500 > >> - title_alt^200 > >> - title_new^100 > >> - title_ueb^100 > >> - title_sub^100 > >> - series^50 > >> - series2^30 > >> - author^300 > >> - author_fuller^150 > >> - contents^10 > >> - topic_unstemmed^550 > >> - topic^500 > >> - geographic^300 > >> - genre^300 > >> - allfields_unstemmed^10 > >> - fulltext_unstemmed^10 > >> - allfields > >> - fulltext > >> - isbn > >> - issn > >> - publishDate > >> DismaxParams: > >> # - [bq, format:Book^5000] > >> - [bf, ord(publishDate)^3000] > >> QueryFields: > >> 0: > >> 0: > >> - OR > >> - 50 > >> title_short: > >> - [onephrase, 750] > >> title_full_unstemmed: > >> - [onephrase, 600] > >> - [and, 500] > >> title_full: > >> - [onephrase, 400] > >> title: > >> - [onephrase, 300] > >> - [and, 250] > >> title_alt: > >> - [and, 200] > >> title_new: > >> - [and, 100] > >> title_ueb: > >> - [and, 100] > >> title_sub: > >> - [and, 100] > >> series: > >> - [and, 50] > >> series2: > >> - [and, 30] > >> author: > >> - [onephrase, 300] > >> - [and, 250] > >> author_fuller: > >> - [onephrase, 150] > >> - [and, 125] > >> author2: > >> - [and, 50] > >> author_additional: > >> - [and, 50] > >> contents: > >> - [and, 10] > >> topic_unstemmed: > >> - [onephrase, 550] > >> - [and, 500] > >> topic: > >> - [onephrase, 500] > >> geographic: > >> - [onephrase, 300] > >> genre: > >> - [onephrase, 300] > >> allfields_unstemmed: > >> - [or, 10] > >> fulltext_unstemmed: > >> - [or, 10] > >> allfields: > >> - [or, ~] > >> fulltext: > >> - [or, ~] > >> issn: > >> - [and, 100] > >> - [or, ~] > >> isbn: > >> - [and, 100] > >> - [or, ~] > >> publishDate: > >> - [and, 100] > >> > >> and the code from the web/sys/solr.php is: > >> > >> 930 if (isset($ss['DismaxParams']) && > >> is_array($ss['DismaxParams'])) { > >> foreach ($ss['DismaxParams'] as $current) { > >> // The way we process the current parameter > >> depends on > >> // whether or not we have previously > >> encountered it. If > >> // we have multiple values for the same > >> parameter, we need > >> // to turn its entry in the $options array into > >> a subarray; > >> // otherwise, one-off parameters can be safely > >> represented > >> // as single values. > >> 938 if (isset($options[$current[0]])) { > >> if (!is_array($options[$current[0]])) { > >> $options[$current[0]] > >> = array($options[$current[0]]); > >> } > >> $options[$current[0]][] = $current[1]; > >> } else { > >> 945 $options[$current[0]] = $current[1]; > >> } > >> //print_r ($ss); > >> } > >> } > >> > >> > >> thank you, > >> Christian > >> > >> > >> Am 24.09.2013 15:45, schrieb Demian Katz: > >>> Could you send a copy of your searchspecs.yaml and the offending lines > (938- > >> 945) from Solr.php? I may be looking at the wrong version of the code, but > >> those line numbers don't seem to match up for me. > >>> > >>> thanks, > >>> Demian > >>> > >>>> -----Original Message----- > >>>> From: Christian Dabrowski [mailto:dab...@fh...] > >>>> Sent: Tuesday, September 24, 2013 8:30 AM > >>>> To: vufind-tech > >>>> Subject: [VuFind-Tech] relevance ranking - Warning: Illegal offset type > >>>> > >>>> Hi Vufinders, > >>>> > >>>> I've seen a thread about boosting newer documents in the relevance > >>>> ranking by Oliver. After the german vufind and some help from Hajo > >>>> (Hamburg) I run into some warnings and notices. > >>>> > >>>> While debug is on, I can see in the "Search options Array" > >>>> > >>>> [bf] => ord(publishDate)^3000 > >>>> [qt] => dismax > >>>> > >>>> and in the results that the boost works. > >>>> > >>>> Vufind returns three messages: > >>>> Warning: Illegal offset type in isset or empty in > >>>> /usr/local/vufind/web/sys/Solr.php on line 938 > >>>> Notice: Undefined offset: 1 in /usr/local/vufind/web/sys/Solr.php on > >>>> line 945 > >>>> Warning: Illegal offset type in /usr/local/vufind/web/sys/Solr.php > on > >>>> line 945 > >>>> > >>>> The mentioned code lines in the solr.php are original. > >>>> > >>>> Hajo asked me to dump the variable $ss in sys/solr.php and I receive a > >>>> whole lotta text: > >>>> > >>>> Array ( [DismaxFields] => Array ( [0] => title_short^750 [1] => > >>>> title_full_unstemmed^600 [2] => title_full^400 [3] => title^500 [4] => > >>>> title_alt^200 [5] => title_new^100 [6] => title_ueb^100 [7] => > >>>> title_sub^100 [8] => series^50 [9] => series2^30 [10] => author^300 [11] > >>>> => author_fuller^150 [12] => contents^10 [13] => topic_unstemmed^550 > >>>> [14] => topic^500 [15] => geographic^300 [16] => genre^300 [17] => > >>>> allfields_unstemmed^10 [18] => fulltext_unstemmed^10 [19] => allfields > >>>> [20] => fulltext [21] => isbn [22] => issn [23] => publishDate ) > >>>> [DismaxParams] => Array ( [0] => Array ( [0] => bf [1] => > >>>> ord(publishDate)^3000 ) [QueryFields] => [1] => Array ( [0] => Array ( > >>>> [0] => OR [1] => 50 ) [title_short] => Array ( [0] => Array ( [0] => > >>>> onephrase [1] => 750 ) ) [title_full_unstemmed] => Array ( [0] => Array > >>>> ( [0] => onephrase [1] => 600 ) [1] => Array ( [0] => and [1] => 500 ) ) > >>>> [title_full] => Array ( [0] => Array ( [0] => onephrase [1] => 400 ) ) > >>>> [title] => Array ( [0] => Array ( [0] => onephrase [1] => 300 ) [1] => > >>>> Array ( [0] => and [1] => 250 ) ) [title_alt] => Array ( [0] => Array ( > >>>> [0] => and [1] => 200 ) ) [title_new] => Array ( [0] => Array ( [0] => > >>>> and [1] => 100 ) ) [title_ueb] => Array ( [0] => Array ( [0] => and [1] > >>>> => 100 ) ) [title_sub] => Array ( [0] => Array ( [0] => and [1] => 100 ) > >>>> ) ) [series] => Array ( [0] => Array ( [0] => and [1] => 50 ) ) > >>>> [series2] => Array ( [0] => Array ( [0] => and [1] => 30 ) ) [author] => > >>>> Array ( [0] => Array ( [0] => onephrase [1] => 300 ) [1] => Array ( [0] > >>>> => and [1] => 250 ) ) [author_fuller] => Array ( [0] => Array ( [0] => > >>>> onephrase [1] => 150 ) [1] => Array ( [0] => and [1] => 125 ) ) > >>>> [author2] => Array ( [0] => Array ( [0] => and [1] => 50 ) ) > >>>> [author_additional] => Array ( [0] => Array ( [0] => and [1] => 50 ) ) > >>>> [contents] => Array ( [0] => Array ( [0] => and [1] => 10 ) ) > >>>> [topic_unstemmed] => Array ( [0] => Array ( [0] => onephrase [1] => 550 > >>>> ) [1] => Array ( [0] => and [1] => 500 ) ) [topic] => Array ( [0] => > >>>> Array ( [0] => onephrase [1] => 500 ) ) [geographic] => Array ( [0] => > >>>> Array ( [0] => onephrase [1] => 300 ) ) [genre] => Array ( [0] => Array > >>>> ( [0] => onephrase [1] => 300 ) ) [allfields_unstemmed] => Array ( [0] > >>>> => Array ( [0] => or [1] => 10 ) ) [fulltext_unstemmed] => Array ( [0] > >>>> => Array ( [0] => or [1] => 10 ) ) [allfields] => Array ( [0] => Array ( > >>>> [0] => or [1] => ) ) [fulltext] => Array ( [0] => Array ( [0] => or [1] > >>>> => ) ) [issn] => Array ( [0] => Array ( [0] => and [1] => 100 ) [1] => > >>>> Array ( [0] => or [1] => ) ) [isbn] => Array ( [0] => Array ( [0] => and > >>>> [1] => 100 ) [1] => Array ( [0] => or [1] => ) ) [publishDate] => Array > >>>> ( [0] => Array ( [0] => and [1] => 100 ) ) ) ) Array ( [DismaxFields] => > >>>> Array ( [0] => title_short^750 [1] => title_full_unstemmed^600 [2] => > >>>> title_full^400 [3] => title^500 [4] => title_alt^200 [5] => > >>>> title_new^100 [6] => title_ueb^100 [7] => title_sub^100 [8] => series^50 > >>>> [9] => series2^30 [10] => author^300 [11] => author_fuller^150 [12] => > >>>> contents^10 [13] => topic_unstemmed^550 [14] => topic^500 [15] => > >>>> geographic^300 [16] => genre^300 [17] => allfields_unstemmed^10 [18] => > >>>> fulltext_unstemmed^10 [19] => allfields [20] => fulltext [21] => isbn > >>>> [22] => issn [23] => publishDate ) > >>>> > >>>> The dumped text still continues, I've just cutted it for mailing reasons. > >>>> > >>>> Does anybody has got a hint where to look at or what's going wrong? > >>>> > >>>> -- > >>>> Beste Grüße, > >>>> Christian Dabrowski > >>>> > >>>> -- > >>>> Christian Dabrowski > >>>> stellv. Bibliotheksleiter > >>>> > >>>> Fachhochschule Südwestfalen > >>>> Hochschulbibliothek > >>>> Haldener Str. 182 > >>>> 58095 Hagen > >>>> Tel: 02331/9330-612 > >>>> Fax: 02331/9330-608 > >>>> dab...@fh... > >>>> www.fh-swf.de/bib > >>>> > >>>> ------------------------------------------------------------------------- > -- > >> --- > >>>> October Webinars: Code for Performance > >>>> Free Intel webinars can help you accelerate application performance. > >>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > >> from > >>>> the latest Intel processors and coprocessors. See abstracts and register > > > >>>> > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk > >>>> _______________________________________________ > >>>> Vufind-tech mailing list > >>>> Vuf...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/vufind-tech > >>> > > |