EPrints Technical Mailing List Archive

Message: #02704


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Simple search - length of query


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.+&_action_search=Search&_order=bytitle&basic_srchtype=ALL&_satisfyall=ALL

searchexp created in cache table:
0|1|-date/creators_name/title|archive|-|full:abstract/creators_name/date/documents/title:ALL:IN:▒Families, Domesticity and Intimacy%3A Changing Relationships in Changing Times▒, 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!

INSERT INTO `cache13849040`
            (`pos`,
             `eprintid`)
SELECT @i := @i + 1,
       `eprintid`
FROM   (SELECT `eprint`.`eprintid`
        FROM   `eprint`
               LEFT JOIN `eprint__ordervalues_en`
                      ON `eprint`.`eprintid` =
                         `eprint__ordervalues_en`.`eprintid`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       `eprint__rindex` AS `eprint__rindex`
                WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                       AND `eprint__rindex`.`field` = 'creators_name'
                       AND `eprint__rindex`.`word` = 'in') AS
               `and_139736218845184_0`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       `eprint__rindex` AS `eprint__rindex`
                WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                       AND `eprint__rindex`.`field` = 'creators_name'
                       AND `eprint__rindex`.`word` = 'in') AS
               `and_139736218845184_1`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       `eprint__rindex` AS `eprint__rindex`
                WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                       AND `eprint__rindex`.`field` = 'creators_name'
                       AND `eprint__rindex`.`word` = 'd') AS
               `and_139736218845184_2`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       `eprint__rindex` AS `eprint__rindex`
                WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                       AND `eprint__rindex`.`field` = 'creators_name'
                       AND `eprint__rindex`.`word` = 'v') AS
               `and_139736218845184_3`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       `eprint__rindex` AS `eprint__rindex`
                WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                       AND `eprint__rindex`.`field` = 'creators_name'
                       AND `eprint__rindex`.`word` = 'pp') AS
               `and_139736218845184_4`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'familie'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'familie'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'familie'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'families') AS
                       `or_139736211880808`
                WHERE  `eprint`.`eprintid` = `or_139736211880808`.`eprintid`) AS
               `and_139736218645768_0`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'domesticity'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'domesticity'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'domesticity'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'domesticity') AS
                       `or_139736215131768`
                WHERE  `eprint`.`eprintid` = `or_139736215131768`.`eprintid`) AS
               `and_139736218645768_1`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'intimacy'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'intimacy'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'intimacy'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'intimacy') AS
                       `or_139736218795072`
                WHERE  `eprint`.`eprintid` = `or_139736218795072`.`eprintid`) AS
               `and_139736218645768_2`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'changing'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'changing'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'changing'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'changing') AS
                       `or_139736208458896`
                WHERE  `eprint`.`eprintid` = `or_139736208458896`.`eprintid`) AS
               `and_139736218645768_3`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'relationship'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'relationship'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'relationship'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'relationships') AS
                       `or_139736218767328`
                WHERE  `eprint`.`eprintid` = `or_139736218767328`.`eprintid`) AS
               `and_139736218645768_4`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'changing'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'changing'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'changing'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'changing') AS
                       `or_139736213650136`
                WHERE  `eprint`.`eprintid` = `or_139736213650136`.`eprintid`) AS
               `and_139736218645768_5`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'time'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'time'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'time'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'times') AS
                       `or_139736215142352`
                WHERE  `eprint`.`eprintid` = `or_139736215142352`.`eprintid`) AS
               `and_139736218645768_6`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'richardson'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'richardson'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'richardson'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'richardson') AS
                       `or_139736218834128`
                WHERE  `eprint`.`eprintid` = `or_139736218834128`.`eprintid`) AS
               `and_139736218645768_7`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'robinson'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'robinson'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'robinson'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'robinson') AS
                       `or_139736215138440`
                WHERE  `eprint`.`eprintid` = `or_139736215138440`.`eprintid`) AS
               `and_139736218645768_8`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'ed'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'ed'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'ed'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'eds') AS
                       `or_139736215136784`
                WHERE  `eprint`.`eprintid` = `or_139736215136784`.`eprintid`) AS
               `and_139736218645768_9`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'introducing'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'introducing'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'introducing'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'introducing') AS
                       `or_139736213048432`
                WHERE  `eprint`.`eprintid` = `or_139736213048432`.`eprintid`) AS
               `and_139736218645768_10`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'women\''
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'women\''
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'women\''
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'women\'s') AS
                       `or_139736215135128`
                WHERE  `eprint`.`eprintid` = `or_139736215135128`.`eprintid`) AS
               `and_139736218645768_11`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'studie'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'studie'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'studie'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'studies') AS
                       `or_139736211943032`
                WHERE  `eprint`.`eprintid` = `or_139736211943032`.`eprintid`) AS
               `and_139736218645768_12`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'third'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'third'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'third'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'third') AS
                       `or_139736215139424`
                WHERE  `eprint`.`eprintid` = `or_139736215139424`.`eprintid`) AS
               `and_139736218645768_13`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'edition'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'edition'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'edition'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'edition') AS
                       `or_139736213364496`
                WHERE  `eprint`.`eprintid` = `or_139736213364496`.`eprintid`) AS
               `and_139736218645768_14`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'basingstoke'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'basingstoke'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'basingstoke'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'basingstoke') AS
                       `or_139736218832112`
                WHERE  `eprint`.`eprintid` = `or_139736218832112`.`eprintid`) AS
               `and_139736218645768_15`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = 'palgrave'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = 'palgrave'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = 'palgrave'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = 'palgrave') AS
                       `or_139736218846000`
                WHERE  `eprint`.`eprintid` = `or_139736218846000`.`eprintid`) AS
               `and_139736218645768_16`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`
                        WHERE  ((( `eprint`.`date_year` = 2008 )))
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND ( `eprint__rindex`.`field` = 'documents'
                                     AND `eprint__rindex`.`word` = '2008'
                                      OR `eprint__rindex`.`field` = 'title'
                                         AND `eprint__rindex`.`word` = '2008'
                                      OR `eprint__rindex`.`field` = 'abstract'
                                         AND `eprint__rindex`.`word` = '2008'
                                      OR
                               `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = '2008' )) AS
                       `or_139736218796824`
                WHERE  `eprint`.`eprintid` = `or_139736218796824`.`eprintid`) AS
               `and_139736218645768_17`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = '125'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = '125'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = '125'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = '125') AS
                       `or_139736218647520`
                WHERE  `eprint`.`eprintid` = `or_139736218647520`.`eprintid`) AS
               `and_139736218645768_18`,
               (SELECT `eprint`.`eprintid` AS `eprintid`
                FROM   `eprint`,
                       (SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'documents'
                               AND `eprint__rindex`.`word` = '143'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'title'
                               AND `eprint__rindex`.`word` = '143'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'abstract'
                               AND `eprint__rindex`.`word` = '143'
                        UNION
                        SELECT `eprint`.`eprintid` AS `eprintid`
                        FROM   `eprint`,
                               `eprint__rindex` AS `eprint__rindex`
                        WHERE  `eprint`.`eprintid` = `eprint__rindex`.`eprintid`
                               AND `eprint__rindex`.`field` = 'creators_name'
                               AND `eprint__rindex`.`word` = '143') AS
                       `or_139736215136592`
                WHERE  `eprint`.`eprintid` = `or_139736215136592`.`eprintid`) AS
               `and_139736218645768_19`
        WHERE  `eprint`.`eprintid` = `and_139736218845184_0`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218845184_1`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218845184_2`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218845184_3`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218845184_4`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_0`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_1`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_2`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_3`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_4`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_5`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_6`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_7`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_8`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_9`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_10`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_11`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_12`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_13`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_14`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_15`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_16`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_17`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_18`.`eprintid`
               AND `eprint`.`eprintid` = `and_139736218645768_19`.`eprintid`
               AND `eprint`.`metadata_visibility` = 'show'
               AND `eprint`.`eprint_status` = 'archive'
        GROUP  BY `eprint`.`eprintid`,
                  `eprint__ordervalues_en`.`date`,
                  `eprint__ordervalues_en`.`creators_name`,
                  `eprint__ordervalues_en`.`title`
        ORDER  BY `eprint__ordervalues_en`.`date` DESC,
                  `eprint__ordervalues_en`.`creators_name` ASC,
                  `eprint__ordervalues_en`.`title` ASC) `S`