<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi John,<br>
      <br>
      Check this:
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <a href="https://github.com/eprints/eprints/issues/120">https://github.com/eprints/eprints/issues/120</a><br>
      <br>
      Without Xapian, the simple search will run SELECT's for each input
      word for each "selected field in the simple search" so yep queries
      will get long quickly. I've seen this to cause a repository to
      halt with any other queries being locked until the max no of
      connections is reached in mysql.<br>
      <br>
      Xapian searches in a totally different manner and scales up &gt;
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <a
href="http://vmdev1.eprints.org/cgi/xapian?q=characteristics+of+organic+matter+and+carbonate+in+saltmarsh+sediments+from+south+west+Scotland">http://vmdev1.eprints.org/cgi/xapian?q=characteristics+of+organic+matter+and+carbonate+in+saltmarsh+sediments+from+south+west+Scotland</a><br>
      <br>
      Hope this helps,<br>
      Seb.<br>
      <br>
      On 05/03/14 11:52, John Salter wrote:<br>
    </div>
    <blockquote
cite="mid:7154BCBB8909D642AE6F44CA713DBC200828ADDA47FF@HERMES7.ds.leeds.ac.uk"
      type="cite">
      <pre wrap="">Hi,
Yesterday we had a bit of an issue with our repository when someone pasted a full citation into the simple search box.
This produced an impressive SQL query that locked things up and made users unhappy...

Is there a way to sanitise what a 'simple' search might try to handle? e.g. would restricting it to a certain number of words be acceptable?
Would the Xapian search handle a request like the one below any better?

Details below/attached if you're interested!
Cheers,
John

GET /cgi/search/simple?full=%E2%80%98Families%2C+Domesticity+and+Intimacy%3A+Changing+Relationships+in+Changi
ng+Times%E2%80%99%2C+in+Richardson%2C+D%2C+and+Robinson%2C+V.+%28eds%29+Introducing+Women%27s+Studies%2C+third+edition.+Basingstoke%3A+Palgrave%2C+2008+pp.+1
25-143.+&amp;_action_search=Search&amp;_order=bytitle&amp;basic_srchtype=ALL&amp;_satisfyall=ALL

searchexp created in cache table:
0|1|-date/creators_name/title|archive|-|full:abstract/creators_name/date/documents/title:ALL:IN:&#9618;Families, Domesticity and Intimacy%3A Changing Relationships in Changing Times&#9618;, in Richardson, D, and Robinson, V. (eds) Introducing Women's Studies, third edition. Basingstoke%3A Palgrave, 2008 pp. 125-143. |-|eprint_status:eprint_status:ANY:EQ:archive|metadata_visibility:metadata_visibility:ANY:EQ:show

The SQL generated by search is attached (get ready for this - it's a thing of beauty ;o) - you can see why it took a while to run!

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>