Hi,

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
possible,
(open to implementing fq & other techniques to speed it up)

Please advice.


Document Structure in XML -

 <doc>
    <str name="subDomain">www</str>
    <str name="domain">ncoah.com</str>
    <str name="path">/links.html</str>
    <str name="urlFull">http://www.ncoah.com/links.html</str>
    <str name="title">North Carolina Office of Administrative Hearings
- Links</str>
    <arr name="text">
      <str>North Carolina Office of Administrative Hearings - Links</str>
    </arr>
    <str name="relatedLinks"> - <a
href="http://www.ncoah.com/links.html";  title="Hearings">Hearings</a>
- <a href="http://www.ncoah.com/links.html";  title="Rules">Rules</a> -
<a href="http://www.ncoah.com/links.html";  title="Civil Rights">Civil
Rights</a> - <a href="http://www.ncoah.com/links.html";
title="Welcome">Welcome</a> - <a
href="http://www.ncoah.com/links.html";  title="General
Information">General Information</a> - <a
href="http://www.ncoah.com/links.html";  title="Directions to
OAH">Directions to OAH</a> - <a href="http://www.ncoah.com/links.html";
 title="Establishment of OAH">Establishment of OAH</a> - <a
href="http://www.ncoah.com/links.html";  title="G.S. 150B">G.S.
150B</a> - <a href="http://www.ncoah.com/links.html";
title="Forms">Forms</a> - <a href="http://www.ncoah.com/links.html";
title="Links">Links</a> - <a href="http://www.nc.gov/";  title="Visit
the North Carolina State web portal">Visit the North Carolina State
web portal</a> - <a
href="http://ncinfo.iog.unc.edu/library/counties.html";  title="North
Carolina Counties">North Carolina Counties</a> - <a
href="http://ncinfo.iog.unc.edu/library/cities.html";  title="North
Carolina Cities & Towns">North Carolina Cities & Towns</a> - <a
href="http://www.nccourts.org/";  title="Administrative Office of the
Courts">Administrative Office of the Courts</a> - <a
href="http://www.ncleg.net/";  title="North Carolina General
Assembly">North Carolina General Assembly</a> - <a
href="http://www.doa.state.nc.us/";  title="Department of
Administration">Department of Administration</a> - <a
href="http://www.ncagr.com/";  title="Department of
Agriculture">Department of Agriculture</a> - <a
href="http://www.nccommerce.com";  title="Department of
Commerce">Department of Commerce</a> - <a
href="http://www.doc.state.nc.us/";  title="Department of
Correction">Department of Correction</a> - <a
href="http://www.nccrimecontrol.org/";  title="Department of Crime
Control & Public Safety">Department of Crime Control & Public
Safety</a> - <a href="http://www.ncdcr.gov/";  title="Department of
Cultural Resources">Department of Cultural Resources</a> - <a
href="http://www.ncdenr.gov/";  title="Department of Environment and
Natural Resources">Department of Environment and Natural Resources</a>
- <a href="http://www.dhhs.state.nc.us";  title="Department of Health
and Human Services">Department of Health and Human Services</a> - <a
href="http://www.ncdoi.com/";  title="Department of
Insurance">Department of Insurance</a> - <a
href="http://www.ncdoj.com/";  title="Department of Justice">Department
of Justice</a> - <a href="http://www.juvjus.state.nc.us/";
title="Department of Juvenile Justice and Delinquency
Prevention">Department of Juvenile Justice and Delinquency
Prevention</a> - <a href="http://www.nclabor.com/";  title="Department
of Labor">Department of Labor</a> - <a
href="http://www.dpi.state.nc.us/";  title="Department of Public
Instruction">Department of Public Instruction</a> - <a
href="http://www.dor.state.nc.us/";  title="Department of
Revenue">Department of Revenue</a> - <a
href="http://www.treasurer.state.nc.us/";  title="Department of State
Treasurer">Department of State Treasurer</a> - <a
href="http://www.ncdot.org/";  title="Department of
Transportation">Department of Transportation</a> - <a
href="http://www.secstate.state.nc.us/";  title="Department of the
Secretary of State">Department of the Secretary of State</a> - <a
href="http://www.osp.state.nc.us/";  title="Office of State
Personnel">Office of State Personnel</a> - <a
href="http://www.governor.state.nc.us/";  title="Office of the
Governor">Office of the Governor</a> - <a
href="http://www.ltgov.state.nc.us/";  title="Office of the Lt.
Governor">Office of the Lt. Governor</a> - <a
href="http://www.ncauditor.net/";  title="Office of the State
Auditor">Office of the State Auditor</a> - <a
href="http://www.osc.nc.gov/";  title="Office of the State
Controller">Office of the State Controller</a> - <a
href="http://www.ncbar.org/";  title="North Carolina Bar
Association">North Carolina Bar Association</a> - <a
href="http://www.ncbar.com/index.asp";  title="North Carolina State
Bar">North Carolina State Bar</a> - <a
href="http://ncrules.state.nc.us/ncadministrativ_/default.htm";
title="North Carolina Administrative Code">North Carolina
Administrative Code</a> - <a
href="http://www.ncoah.com/rules/register/";  title="North Carolina
Register">North Carolina Register</a> - <a
href="http://www.gpo.gov/fdsys/browse/collectionUScode.action?collectionCode=USCODE";
 title="United States Code">United States Code</a> - <a
href="http://www.gpo.gov/fdsys/browse/collectionCfr.action?collectionCode=CFR";
 title="Code of Federal Regulations">Code of Federal Regulations</a> -
<a href="http://www.uscourts.gov/court_locator.aspx";  title="U.S.
Federal Courts Finder">U.S. Federal Courts Finder</a> - <a
href="http://www.supremecourtus.gov/";  title="US Supreme Court">US
Supreme Court</a> - <a href="http://www.law.cornell.edu/supct/";
title="- U.S Supreme Court Rulings">- U.S Supreme Court Rulings</a> -
<a href="http://www.loc.gov/";  title="Library of Congress">Library of
Congress</a> - <a href="http://www.pacer.gov/";  title="Public Access
to Court Electronic Records (PACER)">Public Access to Court Electronic
Records (PACER)</a> - <a href="http://www.abanet.org/";
title="American Bar Association">American Bar Association</a> - <a
href="http://www.abanet.org/adminlaw/";  title="- Section of
Administrative Law & Regulatory Practice">- Section of Administrative
Law & Regulatory Practice</a> - <a
href="http://www.law.fsu.edu/library/admin/";  title="- Administrative
Procedure Database">- Administrative Procedure Database</a> - <a
href="http://www.aallnet.org/";  title="American Association of Law
Libraries">American Association of Law Libraries</a> - <a
href="http://www.administrativerules.org/index.php?option=com_content&view=category&id=50&Itemid=55";
 title="Administrative Codes & Registers">Administrative Codes &
Registers</a> - <a href="http://www.law.cornell.edu/";
title="Cornell's Legal Information Institute">Cornell's Legal
Information Institute</a> - <a
href="http://www.law.cornell.edu/topics/administrative.html";  title="-
Administrative Law Links">- Administrative Law Links</a> - <a
href="http://dictionary.law.com/";  title="Law.com, Law
Dictionary">Law.com, Law Dictionary</a> - <a
href="http://www.naalj.org/";  title="National Association of
Administrative Law Judges">National Association of Administrative Law
Judges</a> - <a href="http://www.ncsc.org/";  title="National Center
for State Courts">National Center for State Courts</a> - <a
href="http://www.ncoah.com/links.html";  title="OAH Home">OAH Home</a>
- <a href="http://www.ncoah.com/links.html";
title="Hearings">Hearings</a> - <a
href="http://www.ncoah.com/links.html";  title="Rules">Rules</a> - <a
href="http://www.ncoah.com/links.html";  title="Civil Rights">Civil
Rights</a> - <a href="http://www.ncoah.com/links.html";
title="Forms">Forms</a> - <a href="http://www.ncoah.com/links.html";
title="Links">Links</a> - <a href="http://www.ncoah.com/links.html";
title="Privacy Policy">Privacy Policy</a> - <a
href="http://www.ncoah.com/links.html";
title="Disclaimer">Disclaimer</a> - <a
href="mailto:oah.postmas...@oah.nc.gov";
title="oah.postmas...@oah.nc.gov">oah.postmas...@oah.nc.gov</a></str>
    <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.com, 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: oah.postmas...@oah.nc.gov</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">
      <str>NOW</str>
    </arr></doc>

Reply via email to