"highlighting = false" in searches.ini isn't being honored

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

"highlighting = false" in searches.ini isn't being honored

Delis, Christopher

In my config/vufind/searches.ini, I have the following setting:

; Set this to true in order to highlight keywords from the search query when they
; appear in fields displayed in search results.
highlighting = false


When debugging my code the following value for $hl is always NULL:

  https://github.com/vufind-org/vufind/blob/v3.1.2/module/VuFind/src/VuFind/Search/Solr/InjectHighlightingListener.php#L112


But I continue to see highlighting in my Search Results. I'm wondering if this is a general issue or if something is wrong with my installation. Can someone please verify if it is working?

My latest git merge was based on tag v3.1.2 on:

commit 28c7087ee3b972d2ea2ff4b28914e8ee0291c354
Author: Demian Katz <[hidden email]>
Date:   Fri Jan 13 11:34:29 2017 -0500


Thanks,
Chris





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "highlighting = false" in searches.ini isn't being honored

Delis, Christopher
Sorry if my previous email was confusing.

The reason "highlighting = false" is not being honored in my particular installation is obviously because the $hl variable is always NULL, therefore the following code ( https://github.com/vufind-org/vufind/blob/v3.1.2/module/VuFind/src/VuFind/Search/Solr/InjectHighlightingListener.php#L112
 ) will always turn highlighting support *on*:

                $hl = $params->get('hl');
                if (!isset($hl[0]) || $hl[0] != 'false') {
                    $this->active = true;
                    $params->set('hl', 'true');
                    $params->set('hl.fl', $this->fieldList);
                    $params->set('hl.simple.pre', '{{{{START_HILITE}}}}');
                    $params->set('hl.simple.post', '{{{{END_HILITE}}}}');
                    // Turn on hl.q generation in query builder:
                    $this->backend->getQueryBuilder()
                        ->setCreateHighlightingQuery(true);
                }

But what I do not know is if the problem is with my installation or with VuFind in general.

Chris



________________________________________
From: Delis, Christopher [[hidden email]]
Sent: Monday, February 20, 2017 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] "highlighting = false" in searches.ini isn't being       honored

In my config/vufind/searches.ini, I have the following setting:

; Set this to true in order to highlight keywords from the search query when they
; appear in fields displayed in search results.
highlighting = false


When debugging my code the following value for $hl is always NULL:

  https://github.com/vufind-org/vufind/blob/v3.1.2/module/VuFind/src/VuFind/Search/Solr/InjectHighlightingListener.php#L112


But I continue to see highlighting in my Search Results. I'm wondering if this is a general issue or if something is wrong with my installation. Can someone please verify if it is working?

My latest git merge was based on tag v3.1.2 on:

commit 28c7087ee3b972d2ea2ff4b28914e8ee0291c354
Author: Demian Katz <[hidden email]>
Date:   Fri Jan 13 11:34:29 2017 -0500


Thanks,
Chris





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "highlighting = false" in searches.ini isn't being honored

Demian Katz

Chris,


Here is the logic that is supposed to turn off the highlighting option based on the configuration you mention:


https://github.com/vufind-org/vufind/blob/master/module/VuFind/src/VuFind/Search/Solr/Params.php#L548


It's certainly possible that something has gotten broken, but at least the code is still there! This would be a good place to start debugging to see if the issue has to do with configurations not getting read in correctly by the Options object, or if the config is loading correctly but the order of events is wrong, or something else. I'm still on vacation today but can look at this more after I get back tomorrow. Please let me know if you have a chance to gather any more information before I take a look.


thanks,

Demian



From: Delis, Christopher <[hidden email]>
Sent: Monday, February 20, 2017 11:58 AM
To: [hidden email]
Subject: Re: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored
 
Sorry if my previous email was confusing.

The reason "highlighting = false" is not being honored in my particular installation is obviously because the $hl variable is always NULL, therefore the following code ( https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvufind-org%2Fvufind%2Fblob%2Fv3.1.2%2Fmodule%2FVuFind%2Fsrc%2FVuFind%2FSearch%2FSolr%2FInjectHighlightingListener.php%23L112&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=BPd5lfqT8aJk%2BjZNd62XKRbqsm%2BvkvO28NERFtgaNfU%3D&reserved=0
 ) will always turn highlighting support *on*:

                $hl = $params->get('hl');
                if (!isset($hl[0]) || $hl[0] != 'false') {
                    $this->active = true;
                    $params->set('hl', 'true');
                    $params->set('hl.fl', $this->fieldList);
                    $params->set('hl.simple.pre', '{{{{START_HILITE}}}}');
                    $params->set('hl.simple.post', '{{{{END_HILITE}}}}');
                    // Turn on hl.q generation in query builder:
                    $this->backend->getQueryBuilder()
                        ->setCreateHighlightingQuery(true);
                }

But what I do not know is if the problem is with my installation or with VuFind in general.

Chris



________________________________________
From: Delis, Christopher [[hidden email]]
Sent: Monday, February 20, 2017 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] "highlighting = false" in searches.ini isn't being       honored

In my config/vufind/searches.ini, I have the following setting:

; Set this to true in order to highlight keywords from the search query when they
; appear in fields displayed in search results.
highlighting = false


When debugging my code the following value for $hl is always NULL:

  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvufind-org%2Fvufind%2Fblob%2Fv3.1.2%2Fmodule%2FVuFind%2Fsrc%2FVuFind%2FSearch%2FSolr%2FInjectHighlightingListener.php%23L112&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=BPd5lfqT8aJk%2BjZNd62XKRbqsm%2BvkvO28NERFtgaNfU%3D&reserved=0


But I continue to see highlighting in my Search Results. I'm wondering if this is a general issue or if something is wrong with my installation. Can someone please verify if it is working?

My latest git merge was based on tag v3.1.2 on:

commit 28c7087ee3b972d2ea2ff4b28914e8ee0291c354
Author: Demian Katz <[hidden email]>
Date:   Fri Jan 13 11:34:29 2017 -0500


Thanks,
Chris





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=rxPDXZ6%2F4zF5KLZKIJaOjdAjzEt7oUJKOY1iPHAKlxg%3D&reserved=0
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=63fBM7jM5996tSi66HN68CIFyPCWk2s8%2BJ3ATZdwFs0%3D&reserved=0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=rxPDXZ6%2F4zF5KLZKIJaOjdAjzEt7oUJKOY1iPHAKlxg%3D&reserved=0
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=63fBM7jM5996tSi66HN68CIFyPCWk2s8%2BJ3ATZdwFs0%3D&reserved=0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "highlighting = false" in searches.ini isn't being honored

Delis, Christopher
Thanks for the pointer, Demian. Not sure if I'll be able to get a look at it today, but if I do I will certainly share. One of the reasons I sent this email out (before looking into it further myself) was to see if others had this setting (highlighting=false) working for them (which would mean it's probably something in my env that is messed up). I'm guessing most people have this setting set to true, though (the default value). Hope you are enjoying your vacation (and not spending too much time working :-) Chris



From: Demian Katz [[hidden email]]
Sent: Tuesday, February 21, 2017 9:21 AM
To: Delis, Christopher; [hidden email]
Subject: Re: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored

Chris,


Here is the logic that is supposed to turn off the highlighting option based on the configuration you mention:


https://github.com/vufind-org/vufind/blob/master/module/VuFind/src/VuFind/Search/Solr/Params.php#L548


It's certainly possible that something has gotten broken, but at least the code is still there! This would be a good place to start debugging to see if the issue has to do with configurations not getting read in correctly by the Options object, or if the config is loading correctly but the order of events is wrong, or something else. I'm still on vacation today but can look at this more after I get back tomorrow. Please let me know if you have a chance to gather any more information before I take a look.


thanks,

Demian



From: Delis, Christopher <[hidden email]>
Sent: Monday, February 20, 2017 11:58 AM
To: [hidden email]
Subject: Re: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored
 
Sorry if my previous email was confusing.

The reason "highlighting = false" is not being honored in my particular installation is obviously because the $hl variable is always NULL, therefore the following code ( https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvufind-org%2Fvufind%2Fblob%2Fv3.1.2%2Fmodule%2FVuFind%2Fsrc%2FVuFind%2FSearch%2FSolr%2FInjectHighlightingListener.php%23L112&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=BPd5lfqT8aJk%2BjZNd62XKRbqsm%2BvkvO28NERFtgaNfU%3D&reserved=0
 ) will always turn highlighting support *on*:

                $hl = $params->get('hl');
                if (!isset($hl[0]) || $hl[0] != 'false') {
                    $this->active = true;
                    $params->set('hl', 'true');
                    $params->set('hl.fl', $this->fieldList);
                    $params->set('hl.simple.pre', '{{{{START_HILITE}}}}');
                    $params->set('hl.simple.post', '{{{{END_HILITE}}}}');
                    // Turn on hl.q generation in query builder:
                    $this->backend->getQueryBuilder()
                        ->setCreateHighlightingQuery(true);
                }

But what I do not know is if the problem is with my installation or with VuFind in general.

Chris



________________________________________
From: Delis, Christopher [[hidden email]]
Sent: Monday, February 20, 2017 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] "highlighting = false" in searches.ini isn't being       honored

In my config/vufind/searches.ini, I have the following setting:

; Set this to true in order to highlight keywords from the search query when they
; appear in fields displayed in search results.
highlighting = false


When debugging my code the following value for $hl is always NULL:

  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvufind-org%2Fvufind%2Fblob%2Fv3.1.2%2Fmodule%2FVuFind%2Fsrc%2FVuFind%2FSearch%2FSolr%2FInjectHighlightingListener.php%23L112&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=BPd5lfqT8aJk%2BjZNd62XKRbqsm%2BvkvO28NERFtgaNfU%3D&reserved=0


But I continue to see highlighting in my Search Results. I'm wondering if this is a general issue or if something is wrong with my installation. Can someone please verify if it is working?

My latest git merge was based on tag v3.1.2 on:

commit 28c7087ee3b972d2ea2ff4b28914e8ee0291c354
Author: Demian Katz <[hidden email]>
Date:   Fri Jan 13 11:34:29 2017 -0500


Thanks,
Chris





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=rxPDXZ6%2F4zF5KLZKIJaOjdAjzEt7oUJKOY1iPHAKlxg%3D&reserved=0
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=63fBM7jM5996tSi66HN68CIFyPCWk2s8%2BJ3ATZdwFs0%3D&reserved=0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=rxPDXZ6%2F4zF5KLZKIJaOjdAjzEt7oUJKOY1iPHAKlxg%3D&reserved=0
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=63fBM7jM5996tSi66HN68CIFyPCWk2s8%2BJ3ATZdwFs0%3D&reserved=0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "highlighting = false" in searches.ini isn't being honored

Demian Katz

Chris,

 

I just did a quick test of the master code on my test box to see if I’m having the same problem that you are. It does appear that disabling highlighting in searches.ini makes highlighting go away in the primary fields in VuFind. However, I did notice that if I turn highlighting off but turn snippets on, the snippets still contain highlighted text. Is that the problem you are seeing? If so, I can investigate further – it’s possible that Solr is highlighting snippet text regardless of other highlighting parameters. Not sure if that is a bug or a feature. Anyway, I’ll wait for more from you before digging further, but hopefully this is another useful clue.

 

- Demian

 

From: Delis, Christopher [mailto:[hidden email]]
Sent: Tuesday, February 21, 2017 10:44 AM
To: [hidden email]
Subject: Re: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored

 

Thanks for the pointer, Demian. Not sure if I'll be able to get a look at it today, but if I do I will certainly share. One of the reasons I sent this email out (before looking into it further myself) was to see if others had this setting (highlighting=false) working for them (which would mean it's probably something in my env that is messed up). I'm guessing most people have this setting set to true, though (the default value). Hope you are enjoying your vacation (and not spending too much time working :-) Chris

 

 


From: Demian Katz [[hidden email]]
Sent: Tuesday, February 21, 2017 9:21 AM
To: Delis, Christopher; [hidden email]
Subject: Re: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored

Chris,

 

Here is the logic that is supposed to turn off the highlighting option based on the configuration you mention:

 

https://github.com/vufind-org/vufind/blob/master/module/VuFind/src/VuFind/Search/Solr/Params.php#L548

 

It's certainly possible that something has gotten broken, but at least the code is still there! This would be a good place to start debugging to see if the issue has to do with configurations not getting read in correctly by the Options object, or if the config is loading correctly but the order of events is wrong, or something else. I'm still on vacation today but can look at this more after I get back tomorrow. Please let me know if you have a chance to gather any more information before I take a look.

 

thanks,

Demian

 


From: Delis, Christopher <[hidden email]>
Sent: Monday, February 20, 2017 11:58 AM
To: [hidden email]
Subject: Re: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored

 

Sorry if my previous email was confusing.

The reason "highlighting = false" is not being honored in my particular installation is obviously because the $hl variable is always NULL, therefore the following code ( https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvufind-org%2Fvufind%2Fblob%2Fv3.1.2%2Fmodule%2FVuFind%2Fsrc%2FVuFind%2FSearch%2FSolr%2FInjectHighlightingListener.php%23L112&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=BPd5lfqT8aJk%2BjZNd62XKRbqsm%2BvkvO28NERFtgaNfU%3D&reserved=0
 ) will always turn highlighting support *on*:

                $hl = $params->get('hl');
                if (!isset($hl[0]) || $hl[0] != 'false') {
                    $this->active = true;
                    $params->set('hl', 'true');
                    $params->set('hl.fl', $this->fieldList);
                    $params->set('hl.simple.pre', '{{{{START_HILITE}}}}');
                    $params->set('hl.simple.post', '{{{{END_HILITE}}}}');
                    // Turn on hl.q generation in query builder:
                    $this->backend->getQueryBuilder()
                        ->setCreateHighlightingQuery(true);
                }

But what I do not know is if the problem is with my installation or with VuFind in general.

Chris



________________________________________
From: Delis, Christopher [[hidden email]]
Sent: Monday, February 20, 2017 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] "highlighting = false" in searches.ini isn't being       honored

In my config/vufind/searches.ini, I have the following setting:

; Set this to true in order to highlight keywords from the search query when they
; appear in fields displayed in search results.
highlighting = false


When debugging my code the following value for $hl is always NULL:

  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvufind-org%2Fvufind%2Fblob%2Fv3.1.2%2Fmodule%2FVuFind%2Fsrc%2FVuFind%2FSearch%2FSolr%2FInjectHighlightingListener.php%23L112&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=BPd5lfqT8aJk%2BjZNd62XKRbqsm%2BvkvO28NERFtgaNfU%3D&reserved=0


But I continue to see highlighting in my Search Results. I'm wondering if this is a general issue or if something is wrong with my installation. Can someone please verify if it is working?

My latest git merge was based on tag v3.1.2 on:

commit 28c7087ee3b972d2ea2ff4b28914e8ee0291c354
Author: Demian Katz <[hidden email]>
Date:   Fri Jan 13 11:34:29 2017 -0500


Thanks,
Chris





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=rxPDXZ6%2F4zF5KLZKIJaOjdAjzEt7oUJKOY1iPHAKlxg%3D&reserved=0
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=63fBM7jM5996tSi66HN68CIFyPCWk2s8%2BJ3ATZdwFs0%3D&reserved=0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=rxPDXZ6%2F4zF5KLZKIJaOjdAjzEt7oUJKOY1iPHAKlxg%3D&reserved=0
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=63fBM7jM5996tSi66HN68CIFyPCWk2s8%2BJ3ATZdwFs0%3D&reserved=0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "highlighting = false" in searches.ini isn't being honored

Delis, Christopher
Wow. I had snippets set to true. I completely missed the snippets setting. Changing it to false seems to work much better, thank you! :-) 

From: Demian Katz [[hidden email]]
Sent: Wednesday, February 22, 2017 1:33 PM
To: Delis, Christopher; [hidden email]
Subject: RE: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored

Chris,

 

I just did a quick test of the master code on my test box to see if I’m having the same problem that you are. It does appear that disabling highlighting in searches.ini makes highlighting go away in the primary fields in VuFind. However, I did notice that if I turn highlighting off but turn snippets on, the snippets still contain highlighted text. Is that the problem you are seeing? If so, I can investigate further – it’s possible that Solr is highlighting snippet text regardless of other highlighting parameters. Not sure if that is a bug or a feature. Anyway, I’ll wait for more from you before digging further, but hopefully this is another useful clue.

 

- Demian

 

From: Delis, Christopher [mailto:[hidden email]]
Sent: Tuesday, February 21, 2017 10:44 AM
To: [hidden email]
Subject: Re: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored

 

Thanks for the pointer, Demian. Not sure if I'll be able to get a look at it today, but if I do I will certainly share. One of the reasons I sent this email out (before looking into it further myself) was to see if others had this setting (highlighting=false) working for them (which would mean it's probably something in my env that is messed up). I'm guessing most people have this setting set to true, though (the default value). Hope you are enjoying your vacation (and not spending too much time working :-) Chris

 

 


From: Demian Katz [[hidden email]]
Sent: Tuesday, February 21, 2017 9:21 AM
To: Delis, Christopher; [hidden email]
Subject: Re: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored

Chris,

 

Here is the logic that is supposed to turn off the highlighting option based on the configuration you mention:

 

https://github.com/vufind-org/vufind/blob/master/module/VuFind/src/VuFind/Search/Solr/Params.php#L548

 

It's certainly possible that something has gotten broken, but at least the code is still there! This would be a good place to start debugging to see if the issue has to do with configurations not getting read in correctly by the Options object, or if the config is loading correctly but the order of events is wrong, or something else. I'm still on vacation today but can look at this more after I get back tomorrow. Please let me know if you have a chance to gather any more information before I take a look.

 

thanks,

Demian

 


From: Delis, Christopher <[hidden email]>
Sent: Monday, February 20, 2017 11:58 AM
To: [hidden email]
Subject: Re: [VuFind-Tech] "highlighting = false" in searches.ini isn't being honored

 

Sorry if my previous email was confusing.

The reason "highlighting = false" is not being honored in my particular installation is obviously because the $hl variable is always NULL, therefore the following code ( https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvufind-org%2Fvufind%2Fblob%2Fv3.1.2%2Fmodule%2FVuFind%2Fsrc%2FVuFind%2FSearch%2FSolr%2FInjectHighlightingListener.php%23L112&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=BPd5lfqT8aJk%2BjZNd62XKRbqsm%2BvkvO28NERFtgaNfU%3D&reserved=0
 ) will always turn highlighting support *on*:

                $hl = $params->get('hl');
                if (!isset($hl[0]) || $hl[0] != 'false') {
                    $this->active = true;
                    $params->set('hl', 'true');
                    $params->set('hl.fl', $this->fieldList);
                    $params->set('hl.simple.pre', '{{{{START_HILITE}}}}');
                    $params->set('hl.simple.post', '{{{{END_HILITE}}}}');
                    // Turn on hl.q generation in query builder:
                    $this->backend->getQueryBuilder()
                        ->setCreateHighlightingQuery(true);
                }

But what I do not know is if the problem is with my installation or with VuFind in general.

Chris



________________________________________
From: Delis, Christopher [[hidden email]]
Sent: Monday, February 20, 2017 10:14 AM
To: [hidden email]
Subject: [VuFind-Tech] "highlighting = false" in searches.ini isn't being       honored

In my config/vufind/searches.ini, I have the following setting:

; Set this to true in order to highlight keywords from the search query when they
; appear in fields displayed in search results.
highlighting = false


When debugging my code the following value for $hl is always NULL:

  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvufind-org%2Fvufind%2Fblob%2Fv3.1.2%2Fmodule%2FVuFind%2Fsrc%2FVuFind%2FSearch%2FSolr%2FInjectHighlightingListener.php%23L112&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=BPd5lfqT8aJk%2BjZNd62XKRbqsm%2BvkvO28NERFtgaNfU%3D&reserved=0


But I continue to see highlighting in my Search Results. I'm wondering if this is a general issue or if something is wrong with my installation. Can someone please verify if it is working?

My latest git merge was based on tag v3.1.2 on:

commit 28c7087ee3b972d2ea2ff4b28914e8ee0291c354
Author: Demian Katz <[hidden email]>
Date:   Fri Jan 13 11:34:29 2017 -0500


Thanks,
Chris





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=rxPDXZ6%2F4zF5KLZKIJaOjdAjzEt7oUJKOY1iPHAKlxg%3D&reserved=0
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=63fBM7jM5996tSi66HN68CIFyPCWk2s8%2BJ3ATZdwFs0%3D&reserved=0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=rxPDXZ6%2F4zF5KLZKIJaOjdAjzEt7oUJKOY1iPHAKlxg%3D&reserved=0
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7C8a8955765d354f109cdc08d459b1eb7a%7C765a8de5cf9444f09cafae5bf8cfa366%7C1%7C0%7C636232068073962478&sdata=63fBM7jM5996tSi66HN68CIFyPCWk2s8%2BJ3ATZdwFs0%3D&reserved=0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Loading...