eZ Community » Forums » eZ Publish 5 Platform » Simple Search using FullText() is...
expandshrink

Simple Search using FullText() is slowly env=prod

Simple Search using FullText() is slowly env=prod

Saturday 14 March 2015 11:25:47 pm - 3 replies

Hi,

i m using the FullText() Class for the simple search functionality, but the prod-frontend search is taken about 8 to 15 second (depending on searchtext) to get search results . I just dump the returning result after this call without rendering any template.

I have give some search restriction as the class identifier and Subtree pathString, but having 3000 Articel , the search request is taken more time.

Here is my controller .(PS: I m using diffrent languages)

            $response = new Response;
            $request = Request::createFromGlobals();
            $searchText = $request->query->get('search_text');   
 
                $limit = 10;
                
                $offset = $request->query->get('page')?($request->query->get('page')-1)*$limit:0;
                
                $query = new Query();
                $query->limit = $limit;
                $query->offset = $offset;
                $languages = $this->getConfigResolver()->getParameter( 'languages' );
                
                $query->filter = new Criterion\LogicalAnd(
                                            array(
                                                new Criterion\Subtree( $this->getRepository()->getLocationService()->loadLocation( THE-FOLDER-LOCATION-ID-WEHRE-ARTICEL-RESIDE )->pathString ),
                                                new Criterion\Visibility( Criterion\Visibility::VISIBLE ),
                                                new Criterion\LanguageCode( $languages, true ),
                                                new Criterion\ContentTypeIdentifier( array('MY-CLASS-IDENTIFIER') ),
                                                
                                                
                                                )
                                        );
                $query->criterion = new FullText($searchText);
                $list = $this->getRepository()->getSearchService()->findContent($query);
                //print_r($list); // the returning result is taken about 8 to 15 sec. (prod)

Tuesday 17 March 2015 1:04:19 am

Hi,
for reference how long does it take without Fulltext? 

Tuesday 17 March 2015 10:32:56 am

Hi André,

I have used the demoBundle SearchController, but the serach take a long time. That why i m tested with the FullText . But still the same load time (taken about 8 to 9 sec).

I tried also using Criterion\Field without the FullText , it was a little bit faster but i get an error on ezxmltext  Fileds (Intentionally not implemented: A field of type 'ezxmltext' is not searchable in the legacy search engine.)

 new Criterion\Field( 'summary', Criterion\Operator::LIKE, $searchText )

any Idea?

Wednesday 01 April 2015 10:53:05 am

Hi,

we have some related stories now, first one is in progress:

  • https://jira.ez.no/browse/EZP-24206 Performance regarding content type identifier and Field Definition identifier use
    • For now you can try changing Criterion\ContentTypeIdentifier for Criterion\ContentTypeId, as the identifier one was contributed but never optimized, something we are fixing now.
  • https://jira.ez.no/browse/EZP-24177 About changing meaning of isSearchable to allow using Field Criterion on field that are not marked as searchable.

There is no issue tracking your issue on XMLText not being filterable, it can be added, but the index used for this has limited size so won't be able to search for anything but content in the first few paragraphs. For Solr / ElasticSearch this might be easier to implement properly.

Modified on Wednesday 01 April 2015 10:54:46 am by André R

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from