Message from discussion
which query is the best for standard searching?
Received: by 10.68.227.67 with SMTP id ry3mr9911866pbc.8.1341498676912;
Thu, 05 Jul 2012 07:31:16 -0700 (PDT)
X-BeenThere: elasticsearch@googlegroups.com
Received: by 10.68.226.132 with SMTP id rs4ls42071pbc.6.gmail; Thu, 05 Jul
2012 07:31:13 -0700 (PDT)
Received: by 10.68.190.104 with SMTP id gp8mr9878491pbc.4.1341498672741;
Thu, 05 Jul 2012 07:31:12 -0700 (PDT)
Received: by 10.68.190.104 with SMTP id gp8mr9878487pbc.4.1341498672717;
Thu, 05 Jul 2012 07:31:12 -0700 (PDT)
Return-Path: <shaun.ether...@gmail.com>
Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43])
by gmr-mx.google.com with ESMTPS id oh7si1627218pbb.2.2012.07.05.07.31.12
(version=TLSv1/SSLv3 cipher=OTHER);
Thu, 05 Jul 2012 07:31:12 -0700 (PDT)
Received-SPF: pass (google.com: domain of shaun.ether...@gmail.com designates 209.85.160.43 as permitted sender) client-ip=209.85.160.43;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of shaun.ether...@gmail.com designates 209.85.160.43 as permitted sender) smtp.mail=shaun.ether...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-pb0-f43.google.com with SMTP id wz7so21350506pbc.16
for <elasticsearch@googlegroups.com>; Thu, 05 Jul 2012 07:31:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=date:from:to:message-id:in-reply-to:references:subject:x-mailer
:mime-version:content-type;
bh=yJZyVuCDO6ap4dmxAIaut01Pm5Qk+2j9rCdoii9/Sh4=;
b=O0rPtvwUi0LJs6yJJoD9RMrP7naCD3+bQIEWLoThK3lFU5JVTCXEvjEe5uJExPDCCv
GY4Ociz8dBqJImi2NHfPXdweeR/cSjdjLSDGL3+z2FQFKiZ29eJR6J40cLDiGRbDDBvC
1V9g3XGWtZiuj+oGIEgjZcCtGZr/SDKZVAyfldPxTUNiqMWprVIlmE7CnkNZkzUzbqeQ
XZBifhUO1QXh85jV+SsdMKik1/LYRceMA797jXFakekxvZ0+45ZxF7uJ8KIyyUSGmZn8
eCJjVVrfvjb307TD3yL6Yqto4PplVIbcu03xDAGnPkwqQhiSp1CG/DyXzBFkCDtdvgqF
bqlQ==
Received: by 10.68.134.198 with SMTP id pm6mr5439083pbb.159.1341498672493;
Thu, 05 Jul 2012 07:31:12 -0700 (PDT)
Return-Path: <shaun.ether...@gmail.com>
Received: from [192.168.5.3] (ppp240-222.static.internode.on.net. [203.122.240.222])
by mx.google.com with ESMTPS id pi7sm19861227pbb.56.2012.07.05.07.31.10
(version=TLSv1/SSLv3 cipher=OTHER);
Thu, 05 Jul 2012 07:31:11 -0700 (PDT)
Date: Fri, 6 Jul 2012 00:01:06 +0930
From: shaun etherton <shaun.ether...@gmail.com>
To: elasticsearch@googlegroups.com
Message-ID: <1967A5AED2174165B56186FA8D230...@gmail.com>
In-Reply-To: <dae21743-37db-4a5a-b880-1cccf2b6be1e@googlegroups.com>
References: <4b035ecc-d5f3-44bd-996c-1d8110c1b...@n16g2000vbn.googlegroups.com>
<4ae354f4-e228-44b0-ac89-47c6d326069a@googlegroups.com>
<1341400736.8598.11.camel@localhost>
<dae21743-37db-4a5a-b880-1cccf2b6be1e@googlegroups.com>
Subject: Re: which query is the best for standard searching?
X-Mailer: sparrow 1.6.1 (build 1081.52)
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="4ff5a52a_71f32454_d6b0"
--4ff5a52a_71f32454_d6b0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi Marcin
You're not alone; i've found the query DSL quite difficult to understand=
.
This is what i have for my search so far. It's basically a wildcard text =
search which is then filtered to restrict access based on some
of the document properties.
Perhaps this is even more basic than you're looking for. I'm only just st=
arting out with ES and have never used Lucene before.
I imagine what i have done would be considered absolutely terrible by tho=
se =22in the know=22.
https://gist.github.com/3053914
I'd be very grateful if someone who has a good understanding of the ES qu=
ery DSL could take a look at that gist and provide some feedback about th=
e way i've done it and possibly show me how to improve it and/or some alt=
ernative implementations.
A tutorial about the DSL structure would be good (for totally new users) =
but i have not seen anything very helpful to me yet.
It's just been lots of head-scratching and trial-&-error so far. :)
cheers
- shaun
-- =20
shaun etherton
Sent with Sparrow (http://www.sparrowmailapp.com/=3Fsig)
On Thursday, 5 July 2012 at 9:52 PM, Marcin Oleszkiewicz wrote:
> at the moment I know (thanks to Rafa=C5=82) how should I build such que=
ry
> =20
> 1. BOOLEAN query with OR that will find all docs with at least one term=
> 2. PHRASE=5FQUERY to boost documents with words close to each other (us=
ing sloop)
> 3. BOOSTING QUERY to boost that have all terms in the field
> 4. use some language plugin =20
> =20
> how to combine it to a query, it's kinda hard fo a newbie
> =20
> =20
--4ff5a52a_71f32454_d6b0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
<div style=3D=22font-family: Helvetica; font-size: 13px; =
=22>Hi Marcin<br><div><br></div><div>You're not alone; i've found t=
he query DSL quite difficult to understand.</div><div><br></div><div>This=
is what i have for my search so far. It's basically a wildcard text=
search which is then filtered to restrict access based on some</div><div=
>of the document properties.</div><div><br></div><div>Perhaps this is eve=
n more basic than you're looking for. I'm only just starting out with ES =
and have never used Lucene before.</div><div>I imagine what i have done w=
ould be considered absolutely terrible by those =22in the know=22.</=
div><div><br></div><div><a href=3D=22https://gist.github.com/3053914=22>h=
ttps://gist.github.com/3053914</a></div><div><br></div><div>I'd be very g=
rateful if someone who has a good understanding of the ES query DSL could=
take a look at that gist and provide some feedback about the way i've do=
ne it and possibly show me how to improve it and/or some alternative=
implementations.</div><div><br></div><div>A tutorial about the DSL struc=
ture would be good (for totally new users) but i have not seen anything v=
ery helpful to me yet.</div><div>It's just been lots of head-scratching a=
nd trial-&-error so far. :)</div><div><br></div><div>cheers</div><div=
> - shaun</div></div>
<div><div><br></div><div>-- </div><div>shaun etherto=
n</div><div>Sent with <a href=3D=22http://www.sparrowmailapp.com/=3Fsig=22=
>Sparrow</a></div><div><br></div></div>
=20
<p style=3D=22color: =23A0A0A8;=22>On Thursday, 5 July 20=
12 at 9:52 PM, Marcin Oleszkiewicz wrote:</p>
<blockquote type=3D=22cite=22 style=3D=22border-left-styl=
e:solid;border-width:1px;margin-left:0px;padding-left:10px;=22>
<span><div><div>at the moment I know (thanks to Rafa=C5=
=82) how should I build such query<br><br>1. BOOLEAN query with OR that w=
ill find all docs with at least one term<br>2. PHRASE=5FQUERY to boost do=
cuments with words close to each other (using sloop)<br>3. BOOSTING QUERY=
to boost that have all terms in the field<br>4. use some language plugin=
<br><br>how to combine it to a query, it's kinda hard fo a newbie<br><br=
><br></div></div></span>
=20
=20
=20
=20
</blockquote>
=20
<div>
<br>
</div>
--4ff5a52a_71f32454_d6b0--