Understanding Solr Function Query Performanceusing OR and NOT in solr queryElasticSearch, Sphinx, Lucene, Solr, Xapian. Which fits for which usage?NoSQL (MongoDB) vs Lucene (or Solr) as your databaseHow to query SOLR for empty fields?Solr * vs *:* query performanceSolr Query with LIKE ClauseSolr vs. ElasticSearchDifference between solr and luceneSolr/Lucene query lemmatization with contextSOLR 6.6 eDisMax query not respecting mm parameter

Why doesn't philosophy have higher standards for its arguments?

Data Filters and Measures Error for Unique Opens

If I stood next to a piece of metal heated to a million degrees, but in a perfect vacuum, would I feel hot?

How to determine the optimal threshold to achieve the highest accuracy

Can a pizza stone be fixed after soap has been used to clean it?

How to ask my office to remove the pride decorations without appearing anti-LGBTQ?

Unix chat server making communication between terminals possible

Do aircraft cabins have suspension?

Finding the package which provides a given command

Mechanical puzzle ID: Ring, barbell, and four-holed panel

What "fuel more powerful than anything the West (had) in stock" put Laika in orbit aboard Sputnik 2?

Can I remove the doors before installing a sliding patio doors frame?

Do dragons smell of lilacs?

Cine footage fron Saturn V launch's

Did Voldemort kill his father before finding out about Horcruxes?

What impact would a dragon the size of Asia have on the environment?

Why is Katakana not pronounced Katagana?

Why does "git status" show I'm on the master branch and "git branch" does not?

Manually select/unselect lines before forwarding to stdout

Why isn't aluminium involved in biological processes?

What happens on Day 6?

How Efficient Could Anaerobic Megafauna Be?

Why did Steve Rogers choose this character in Endgame?

What powers the air required for pneumatic brakes in aircraft?



Understanding Solr Function Query Performance


using OR and NOT in solr queryElasticSearch, Sphinx, Lucene, Solr, Xapian. Which fits for which usage?NoSQL (MongoDB) vs Lucene (or Solr) as your databaseHow to query SOLR for empty fields?Solr * vs *:* query performanceSolr Query with LIKE ClauseSolr vs. ElasticSearchDifference between solr and luceneSolr/Lucene query lemmatization with contextSOLR 6.6 eDisMax query not respecting mm parameter






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm working with "edismax" and "function-query" parsers in Solr and have difficulty in understanding whether the query time taken by "function-query" makes sense. The query I'm trying to optimize looks as follows:




q=!func sum($q1,$q2,$q3) where q1,q2,q3 are edismax queries.




The QTime returned by edismax queries takes well under 50ms but it seems that function-query is the rate determining step since combined query above takes around 200-300ms. I also analyzed the performance of function query using only constants.



The QTime results for different q are as follows:



  • 097ms for q=!func sum(10,20)


  • 109ms for q=!func sum(10,20,30)


  • 127ms for q=!func sum(10,20,30,40)


  • 145ms for q=!func sum(10,20,30,40,50)


Does this trend make sense? Are function-queries expected to be this slow?



What makes edismax queries so much faster?



What can I do to optimize my original query (which has edismax subqueries q1,q2,q3) to work under 100ms?










share|improve this question




























    1















    I'm working with "edismax" and "function-query" parsers in Solr and have difficulty in understanding whether the query time taken by "function-query" makes sense. The query I'm trying to optimize looks as follows:




    q=!func sum($q1,$q2,$q3) where q1,q2,q3 are edismax queries.




    The QTime returned by edismax queries takes well under 50ms but it seems that function-query is the rate determining step since combined query above takes around 200-300ms. I also analyzed the performance of function query using only constants.



    The QTime results for different q are as follows:



    • 097ms for q=!func sum(10,20)


    • 109ms for q=!func sum(10,20,30)


    • 127ms for q=!func sum(10,20,30,40)


    • 145ms for q=!func sum(10,20,30,40,50)


    Does this trend make sense? Are function-queries expected to be this slow?



    What makes edismax queries so much faster?



    What can I do to optimize my original query (which has edismax subqueries q1,q2,q3) to work under 100ms?










    share|improve this question
























      1












      1








      1








      I'm working with "edismax" and "function-query" parsers in Solr and have difficulty in understanding whether the query time taken by "function-query" makes sense. The query I'm trying to optimize looks as follows:




      q=!func sum($q1,$q2,$q3) where q1,q2,q3 are edismax queries.




      The QTime returned by edismax queries takes well under 50ms but it seems that function-query is the rate determining step since combined query above takes around 200-300ms. I also analyzed the performance of function query using only constants.



      The QTime results for different q are as follows:



      • 097ms for q=!func sum(10,20)


      • 109ms for q=!func sum(10,20,30)


      • 127ms for q=!func sum(10,20,30,40)


      • 145ms for q=!func sum(10,20,30,40,50)


      Does this trend make sense? Are function-queries expected to be this slow?



      What makes edismax queries so much faster?



      What can I do to optimize my original query (which has edismax subqueries q1,q2,q3) to work under 100ms?










      share|improve this question














      I'm working with "edismax" and "function-query" parsers in Solr and have difficulty in understanding whether the query time taken by "function-query" makes sense. The query I'm trying to optimize looks as follows:




      q=!func sum($q1,$q2,$q3) where q1,q2,q3 are edismax queries.




      The QTime returned by edismax queries takes well under 50ms but it seems that function-query is the rate determining step since combined query above takes around 200-300ms. I also analyzed the performance of function query using only constants.



      The QTime results for different q are as follows:



      • 097ms for q=!func sum(10,20)


      • 109ms for q=!func sum(10,20,30)


      • 127ms for q=!func sum(10,20,30,40)


      • 145ms for q=!func sum(10,20,30,40,50)


      Does this trend make sense? Are function-queries expected to be this slow?



      What makes edismax queries so much faster?



      What can I do to optimize my original query (which has edismax subqueries q1,q2,q3) to work under 100ms?







      search solr lucene information-retrieval edismax






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 8:18









      sidharth228sidharth228

      206 bronze badges




      206 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          0














          func query enumerates all docs, thus it doesn't provide any selectivity. You probably don't need to evaluate it on docs, which doesn't match dismaxes eg



          q=+!v=$q1 +!v=$q2 +!v=$q3 !func sum($q1,$q2,$q3)





          share|improve this answer























          • This doesn't work for me. Solr attempts to parse this entire string (using the deault parser) as if it were a keyword. Are you sure about this syntax, because from what I gather, a parser name should follow the "!" and it seems that Solr expects a string for the "v" parameter.

            – sidharth228
            Apr 11 at 10:08












          • pls provide the response with debugQuery=true. Also try with q=%2b!v=$q1 %2b!v=$q2 %2b!v=$q3 !func sum($q1,$q2,$q3)

            – mkhludnev
            Apr 15 at 13:13










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55352565%2funderstanding-solr-function-query-performance%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          func query enumerates all docs, thus it doesn't provide any selectivity. You probably don't need to evaluate it on docs, which doesn't match dismaxes eg



          q=+!v=$q1 +!v=$q2 +!v=$q3 !func sum($q1,$q2,$q3)





          share|improve this answer























          • This doesn't work for me. Solr attempts to parse this entire string (using the deault parser) as if it were a keyword. Are you sure about this syntax, because from what I gather, a parser name should follow the "!" and it seems that Solr expects a string for the "v" parameter.

            – sidharth228
            Apr 11 at 10:08












          • pls provide the response with debugQuery=true. Also try with q=%2b!v=$q1 %2b!v=$q2 %2b!v=$q3 !func sum($q1,$q2,$q3)

            – mkhludnev
            Apr 15 at 13:13















          0














          func query enumerates all docs, thus it doesn't provide any selectivity. You probably don't need to evaluate it on docs, which doesn't match dismaxes eg



          q=+!v=$q1 +!v=$q2 +!v=$q3 !func sum($q1,$q2,$q3)





          share|improve this answer























          • This doesn't work for me. Solr attempts to parse this entire string (using the deault parser) as if it were a keyword. Are you sure about this syntax, because from what I gather, a parser name should follow the "!" and it seems that Solr expects a string for the "v" parameter.

            – sidharth228
            Apr 11 at 10:08












          • pls provide the response with debugQuery=true. Also try with q=%2b!v=$q1 %2b!v=$q2 %2b!v=$q3 !func sum($q1,$q2,$q3)

            – mkhludnev
            Apr 15 at 13:13













          0












          0








          0







          func query enumerates all docs, thus it doesn't provide any selectivity. You probably don't need to evaluate it on docs, which doesn't match dismaxes eg



          q=+!v=$q1 +!v=$q2 +!v=$q3 !func sum($q1,$q2,$q3)





          share|improve this answer













          func query enumerates all docs, thus it doesn't provide any selectivity. You probably don't need to evaluate it on docs, which doesn't match dismaxes eg



          q=+!v=$q1 +!v=$q2 +!v=$q3 !func sum($q1,$q2,$q3)






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 9 at 11:22









          mkhludnevmkhludnev

          1671 silver badge5 bronze badges




          1671 silver badge5 bronze badges












          • This doesn't work for me. Solr attempts to parse this entire string (using the deault parser) as if it were a keyword. Are you sure about this syntax, because from what I gather, a parser name should follow the "!" and it seems that Solr expects a string for the "v" parameter.

            – sidharth228
            Apr 11 at 10:08












          • pls provide the response with debugQuery=true. Also try with q=%2b!v=$q1 %2b!v=$q2 %2b!v=$q3 !func sum($q1,$q2,$q3)

            – mkhludnev
            Apr 15 at 13:13

















          • This doesn't work for me. Solr attempts to parse this entire string (using the deault parser) as if it were a keyword. Are you sure about this syntax, because from what I gather, a parser name should follow the "!" and it seems that Solr expects a string for the "v" parameter.

            – sidharth228
            Apr 11 at 10:08












          • pls provide the response with debugQuery=true. Also try with q=%2b!v=$q1 %2b!v=$q2 %2b!v=$q3 !func sum($q1,$q2,$q3)

            – mkhludnev
            Apr 15 at 13:13
















          This doesn't work for me. Solr attempts to parse this entire string (using the deault parser) as if it were a keyword. Are you sure about this syntax, because from what I gather, a parser name should follow the "!" and it seems that Solr expects a string for the "v" parameter.

          – sidharth228
          Apr 11 at 10:08






          This doesn't work for me. Solr attempts to parse this entire string (using the deault parser) as if it were a keyword. Are you sure about this syntax, because from what I gather, a parser name should follow the "!" and it seems that Solr expects a string for the "v" parameter.

          – sidharth228
          Apr 11 at 10:08














          pls provide the response with debugQuery=true. Also try with q=%2b!v=$q1 %2b!v=$q2 %2b!v=$q3 !func sum($q1,$q2,$q3)

          – mkhludnev
          Apr 15 at 13:13





          pls provide the response with debugQuery=true. Also try with q=%2b!v=$q1 %2b!v=$q2 %2b!v=$q3 !func sum($q1,$q2,$q3)

          – mkhludnev
          Apr 15 at 13:13








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55352565%2funderstanding-solr-function-query-performance%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현