lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris <>
Subject Solr ranking query..
Date Tue, 04 Feb 2014 06:49:45 GMT

I have a document structure that looks like the below. I would like to
implement something like -

(urlKeywords:"+keyword+" AND domainRank:[3 TO 10000] AND adultFlag:N)^60 " +
 "OR (title:"+keyword+" AND domainRank:[3 TO 10000] AND adultFlag:N)^20 " +
  "OR (title:"+keyword+" AND domainRank:[10001 TO *] AND adultFlag:N)^2 " +
  "OR (fulltxt:"+keyword+") "    );

In case we have multiple words in keywords - "A B C D" then for the
documents that have all the words should rank highest (Group1), then 3
words(Group2), then 2 words(Group 3) etc
AND - Within each group (Group1, 2, 3) I would want the ones with the
lowest domain rank value to rank higher (but within the group)

How can i do this in a single query? and please advice on the fastest way
(open to implementing fq & other techniques to speed it up)

Please advice.

Document Structure in XML -

    <str name="subDomain">www</str>
    <str name="domain"></str>
    <str name="path">/links.html</str>
    <str name="urlFull"></str>
    <str name="title">North Carolina Office of Administrative Hearings
- Links</str>
    <arr name="text">
      <str>North Carolina Office of Administrative Hearings - Links</str>
    <str name="relatedLinks"> - <a
href=""  title="Hearings">Hearings</a>
- <a href=""  title="Rules">Rules</a> -
<a href=""  title="Civil Rights">Civil
Rights</a> - <a href=""
title="Welcome">Welcome</a> - <a
href=""  title="General
Information">General Information</a> - <a
href=""  title="Directions to
OAH">Directions to OAH</a> - <a href=""
 title="Establishment of OAH">Establishment of OAH</a> - <a
href=""  title="G.S. 150B">G.S.
150B</a> - <a href=""
title="Forms">Forms</a> - <a href=""
title="Links">Links</a> - <a href=""  title="Visit
the North Carolina State web portal">Visit the North Carolina State
web portal</a> - <a
href=""  title="North
Carolina Counties">North Carolina Counties</a> - <a
href=""  title="North
Carolina Cities & Towns">North Carolina Cities & Towns</a> - <a
href=""  title="Administrative Office of the
Courts">Administrative Office of the Courts</a> - <a
href=""  title="North Carolina General
Assembly">North Carolina General Assembly</a> - <a
href=""  title="Department of
Administration">Department of Administration</a> - <a
href=""  title="Department of
Agriculture">Department of Agriculture</a> - <a
href=""  title="Department of
Commerce">Department of Commerce</a> - <a
href=""  title="Department of
Correction">Department of Correction</a> - <a
href=""  title="Department of Crime
Control & Public Safety">Department of Crime Control & Public
Safety</a> - <a href=""  title="Department of
Cultural Resources">Department of Cultural Resources</a> - <a
href=""  title="Department of Environment and
Natural Resources">Department of Environment and Natural Resources</a>
- <a href=""  title="Department of Health
and Human Services">Department of Health and Human Services</a> - <a
href=""  title="Department of
Insurance">Department of Insurance</a> - <a
href=""  title="Department of Justice">Department
of Justice</a> - <a href=""
title="Department of Juvenile Justice and Delinquency
Prevention">Department of Juvenile Justice and Delinquency
Prevention</a> - <a href=""  title="Department
of Labor">Department of Labor</a> - <a
href=""  title="Department of Public
Instruction">Department of Public Instruction</a> - <a
href=""  title="Department of
Revenue">Department of Revenue</a> - <a
href=""  title="Department of State
Treasurer">Department of State Treasurer</a> - <a
href=""  title="Department of
Transportation">Department of Transportation</a> - <a
href=""  title="Department of the
Secretary of State">Department of the Secretary of State</a> - <a
href=""  title="Office of State
Personnel">Office of State Personnel</a> - <a
href=""  title="Office of the
Governor">Office of the Governor</a> - <a
href=""  title="Office of the Lt.
Governor">Office of the Lt. Governor</a> - <a
href=""  title="Office of the State
Auditor">Office of the State Auditor</a> - <a
href=""  title="Office of the State
Controller">Office of the State Controller</a> - <a
href=""  title="North Carolina Bar
Association">North Carolina Bar Association</a> - <a
href=""  title="North Carolina State
Bar">North Carolina State Bar</a> - <a
title="North Carolina Administrative Code">North Carolina
Administrative Code</a> - <a
href=""  title="North Carolina
Register">North Carolina Register</a> - <a
 title="United States Code">United States Code</a> - <a
 title="Code of Federal Regulations">Code of Federal Regulations</a> -
<a href=""  title="U.S.
Federal Courts Finder">U.S. Federal Courts Finder</a> - <a
href=""  title="US Supreme Court">US
Supreme Court</a> - <a href=""
title="- U.S Supreme Court Rulings">- U.S Supreme Court Rulings</a> -
<a href=""  title="Library of Congress">Library of
Congress</a> - <a href=""  title="Public Access
to Court Electronic Records (PACER)">Public Access to Court Electronic
Records (PACER)</a> - <a href=""
title="American Bar Association">American Bar Association</a> - <a
href=""  title="- Section of
Administrative Law & Regulatory Practice">- Section of Administrative
Law & Regulatory Practice</a> - <a
href=""  title="- Administrative
Procedure Database">- Administrative Procedure Database</a> - <a
href=""  title="American Association of Law
Libraries">American Association of Law Libraries</a> - <a
 title="Administrative Codes & Registers">Administrative Codes &
Registers</a> - <a href=""
title="Cornell's Legal Information Institute">Cornell's Legal
Information Institute</a> - <a
href=""  title="-
Administrative Law Links">- Administrative Law Links</a> - <a
href=""  title=", Law
Dictionary">, Law Dictionary</a> - <a
href=""  title="National Association of
Administrative Law Judges">National Association of Administrative Law
Judges</a> - <a href=""  title="National Center
for State Courts">National Center for State Courts</a> - <a
href=""  title="OAH Home">OAH Home</a>
- <a href=""
title="Hearings">Hearings</a> - <a
href=""  title="Rules">Rules</a> - <a
href=""  title="Civil Rights">Civil
Rights</a> - <a href=""
title="Forms">Forms</a> - <a href=""
title="Links">Links</a> - <a href=""
title="Privacy Policy">Privacy Policy</a> - <a
title="Disclaimer">Disclaimer</a> - <a
    <str name="fulltxt">North Carolina Office of Administrative
Hearings - Links Divisions Hearings Rules Civil Rights OAH Welcome
General Information Directions to OAH Establishment of OAH G.S. 150B
Forms Links Search OAH North Carolina Office of Administrative
Hearings - Links Visit the North Carolina State web portal North
Carolina Counties North Carolina Cities & Towns North Carolina State
Agencies Administrative Office of the Courts North Carolina General
Assembly       Department of Administration       Department of
Agriculture       Department of Commerce       Department of
Correction       Department of Crime Control & Public Safety
Department of Cultural Resources       Department of Environment and
Natural Resources       Department of Health and Human Services
Department of Insurance       Department of Justice       Department
of Juvenile Justice and Delinquency Prevention       Department of
Labor       Department of Public Instruction       Department of
Revenue       Department of State Treasurer       Department of
Transportation       Department of the Secretary of State       Office
of State Personnel       Office of the Governor       Office of the
Lt. Governor       Office of the State Auditor       Office of the
State Controller Legal Sites      North Carolina North Carolina Bar
Association North Carolina State Bar North Carolina Administrative
Code North Carolina Register      Federal United States Code Code of
Federal Regulations U.S. Federal Courts Finder US Supreme Court
- U.S Supreme Court Rulings Library of Congress Public Access to Court
Electronic Records (PACER)      Other American Bar Association       -
Section of Administrative Law & Regulatory Practice       -
Administrative Procedure Database American Association of Law
Libraries Administrative Codes & Registers Cornell's Legal Information
Institute       - Administrative Law Links, Law Dictionary
National Association of Administrative Law Judges National Center for
State Courts   | OAH Home | Hearings | Rules | Civil Rights | Forms |
Links | Privacy Policy | Disclaimer | If you have any questions or
comments, please e-mail:</str>
    <str name="boldKeywords">North Carolina State Agencies, Legal
Sites, North Carolina, Federal, Other,</str>
    <str name="h1Keywords"/>
    <int name="domainRank">1709924</int>
    <float name="cleanRank">0.0</float>
    <str name="anchorText">Links</str>
    <int name="textLength">2176</int>
    <int name="htmlLength">18887</int>
    <int name="outgoingLinksNumber">77</int>
    <str name="adultFlag">Y</str>
    <str name="urlKeywords">    www ncoah com links html</str>
    <date name="timestamp">2013-11-02T22:15:25.907Z</date>
    <long name="_version_">1450632050861146113</long>
    <arr name="relatedImages">

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message