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

          How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

          Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?