Skip to content

Conversation

@pkamps
Copy link
Member

@pkamps pkamps commented Apr 9, 2019

This pull request is only refactoring some code deficits: There are 2 functions (buildSearch and buildMoreLikeThis) both compiling a list of fields a SOLR search should return. This pull request is adding a new function that compiles that list, and both buildSearch and buildMoreLikeThis are now using that function to get the list of fields.

Testing instructions:

  • In a template (for example pagelayout.tpl) add following code:
    {def $result = fetch( 'ezfind', 'search', hash(
        'query', '*',
        'as_objects', false()
    ))}

    {$result|dump()}
    {$result.SearchResult.0|dump()}

    <h1>More Like This</h1>

    {def $result = fetch( 'ezfind', 'moreLikeThis', hash(
        'query_type', 'blob',
        'query', 'ez publish home common key word in your DB'
    ))}

    {$result|dump()}
    {$result.SearchResult.0|dump()}
  • Run this template code with and without this pull request
  • Confirm that you have the same result sets from ezfind

Note: you need an ezp installation with ezfind enabled and the DB content indexed. If you get an empty result set from the 'More like this' example, you need to type in different keywords in the query parameter.

@benkmugo benkmugo requested review from benkmugo and removed request for benkmugo May 8, 2019 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants