[ https://issues.apache.org/jira/browse/SOLR-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Høydahl updated SOLR-3026: ------------------------------ Attachment: SOLR-3026.patch I've worked with HossMan patch from SOLR-1553 and made it work with trunk. It's still a bit hacky I think, as I don't fully understand all the parsing stuff in there, but it works :) Here's how to use it: {noformat} q=id:123 => HIT, default for empty "uf" is allowing all fields, as today q=id:123&uf=* => HIT, explicitly allowing all fields q=id:123&uf=id => HIT, explicitly allowing only field "id" q=id:123&uf=id^2 => HIT, using the boost from uf q=id:123&uf=*^3 -name => HIT, allowing all fields except "name", using boost from "*" q=id:123&uf=-* => NO HIT, disallowing all fields q=id:123&uf=* -id => NO HIT, allowing all fields except "id" {noformat} What happens when you query disallowed fields is that the ":" gets escaped so that the whole clause is searched as a literal. It feels a bit dirty to modify the "clause.raw" string in order to escape colon, and to add "^" boost etc. Don't know if this has other side effects. But it's a start. Please test it and comment on better ways of doing things. > eDismax: Locking down which fields can be explicitly queries (user fields aka > uf) > --------------------------------------------------------------------------------- > > Key: SOLR-3026 > URL: https://issues.apache.org/jira/browse/SOLR-3026 > Project: Solr > Issue Type: Improvement > Components: search > Affects Versions: 3.1, 3.2, 3.3, 3.4, 3.5 > Reporter: Jan Høydahl > Assignee: Jan Høydahl > Fix For: 3.6, 4.0 > > Attachments: SOLR-3026.patch > > > We need a way to specify exactly what fields should be available to the end > user as fielded search. > In the original SOLR-1553, there's a patch implementing "user fields", but it > was never committed even if that issue was closed. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org