Re: Clustering always return labels":["Other Topics"]

2019-12-26 Thread Ahmed Adel
Hi - adding carrot.title field should resolve this issue

On Thu, Dec 19, 2019 at 2:22 AM Nehemia Litterat 
wrote:

> Hi,
> I am using stand alone solr 8.2 server.
> Used this guide to define Clustering
> https://carrot2.github.io/solr-integration-strategies/carrot2-3.6.3/index.html
>
>
> (Attached the config file)
>
> When running a query no real results are returned
> Included the file with the query and return results as seen in the admin
> GUI
>
> I will appreciate any suggestions.
>
> Thanks,
>
> [image: photo]
> *Nehemia Litterat*
> Our story
>
> +972-54-6609351 | nlitte...@gmail.com
>
> Skype: nlitterat
> <#m_-766721743052806071_SignatureSanitizer_SafeHtmlFilter_>
> 
> Please consider your environmental responsibility. Before printing this
> e-mail message, ask yourself whether you really need a hard copy.
> Create your own email signature
> 
>
-- 
Sent from my iPhone


Joins and text fields projection

2019-10-20 Thread Ahmed Adel
Hi,

Is there a way to select text fields in a query with a join clause in
Streaming Expressions or Parallel SQL? The following query:

SELECT field_s, field_t FROM t1 INNER JOIN t2 ON t1.a = t2.a LIMIT 10

requires that field_t, which is of type text, have docValues enabled, which
is not supported afaik:

java.io.IOException: --> http://172.31.34.56:8983/solr/t1:Failed to execute
sqlQuery 'SELECT field_s, field_t FROM t1 INNER JOIN t2 ON t1.a = t2.a
LIMIT 10' against JDBC connection 'jdbc:calcitesolr:'. Error while
executing SQL "SELECT field_s, field_t FROM t1 INNER JOIN t2 ON t1.a = t2.a
LIMIT 10": java.io.IOException: java.util.concurrent.ExecutionException:
java.io.IOException: -->
http://172.18.0.2:8983/solr/t1_shard1_replica_n1/:field_t{type=text_general,properties=indexed,tokenized,stored,useDocValuesAsStored,uninvertible}
must have DocValues to use this feature.

Its equivalent streaming expression clearly results in the same:

innerJoin(
  search(t1, q="*:*", qt="/export", fl="a1,field_t", sort="a asc"),
  search(t2, q="*:*", qt="/export", fl="a2,field_s", sort="a asc"),
  on="a"
)

java.io.IOException: -->
http://172.31.34.56:8983/solr/reviews:java.util.concurrent.ExecutionException:
java.io.IOException: -->
http://172.18.0.2:8983/solr/t1_shard1_replica_n1/:field_t{type=text_general,properties=indexed,tokenized,stored,useDocValuesAsStored,uninvertible}
must have DocValues to use this feature.

Thanks,
A.


Re: Solr 8.2 docker image in cloud mode not connecting to Zookeeper on startup

2019-10-18 Thread Ahmed Adel
This could be because Zookeeper ensemble is not properly configured. Using
a very similar setup which consists of ZK cluster of three hosts and one
Solr Cloud node (all are containers), the system got running. Each ZK host
has ZOO_MY_ID and ZOO_SERVERS environment variables set before running ZK.
In this case, the former variable value would be from 1 to 3 on each host
and the latter would be "server.1=z1:2888:3888;2181
server.2=z2:2888:3888;2181 server.3=z3:2888:3888;2181" the same on all
hosts (the double quotes may be needed for proper parsing). This
ZOO_SERVERS syntax is for ZK version 3.5. 3.4 is slightly different.

http://aadel.io

On Fri, Oct 18, 2019 at 5:28 PM Drew Kidder  wrote:

> Thank you all for your suggestions! I appreciate the fast turnaround.
>
> My setup is using Amazon ECS for our solr cloud installation. Each ZK is in
> its own container, using Route53 Service Discovery to provide the DNS name.
> The ZK nodes can all talk to each other, and I can communicate to each one
> of those nodes from my local machine and from within the solr container.
> Solr is one node per container, as Martijn correctly assumed. I am not
> using a zkRoot at present because my intention is to use ZK solely for Solr
> Cloud and nothing else.
>
> I have tried removing the "-z" option from the Dockerfile CMD and using the
> ZK_HOST environment variable (see below). I have even also modified the
> solr.in.sh and set the ZK_HOST variable there, all to no avail. I have
> tried both the Dockerfile command route, and have logged into the solr
> container and tried to run the CMD manually to see if there was a problem
> with the way I was using the CMD entry. All of those methods give me the
> same result output captured in the gist below.
>
> The gist for my solr.log output is here:
> https://gist.github.com/dkidder/2db9a6d393dedb97a39ed32e2be0c087
>
> My Dockerfile for the solr container looks like this:
>
>
> FROMsolr:8.2
>
> EXPOSE8983 8999 2181
>
> VOLUME/app/logs
> VOLUME/app/data
> VOLUME/app/conf
>
> ## add our jetty configuration (increased request size!)
> COPY   jetty.xml /opt/solr/server/etc/
>
> ## SolrCloud configuration
> ENV ZK_HOST zk1:2181,zk2:2181,zk3:2181
> ENV ZK_CLIENT_TIMEOUT 3
>
> USER   root
> RUNapt-get update
> RUNapt-get install -y netcat net-tools vim procps
> USER   solr
>
> # Copy over custom solr plugins
> COPYmyplugins/src/resources/* /opt/solr/server/solr/my-resources/
> COPYlib/*.jar /opt/solr/my-lib/
>
> # Copy over my configs
> COPYconf/ /app/conf
>
> #Start solr in cloud mode, connecting to zookeeper
> CMD   ["solr","start","-f","-c"]
>
> The docker command I use to execute this Dockerfile is `docker run -p
> 8983:8983 -p 2181:2181 --name $(APP_NAME) $(APP_NAME):latest`
>
> Output of `ps -eflww` from within the solr container (as root):
>
> root@fe0ad5b40b42:/opt/solr-8.2.0# ps -eflww
> F S UIDPID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY  TIME
> CMD
> 4 S solr 1 0  9  80   0 - 1043842 -14:36 ?00:00:07
> /usr/local/openjdk-11/bin/java -server -Xms512m -Xmx512m -XX:+UseG1GC
> -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled
> -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch
>
> -Xlog:gc*:file=/var/solr/logs/solr_gc.log:time,uptime:filecount=9,filesize=20M
> -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.local.only=false
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.port=18983
> -Dcom.sun.management.jmxremote.rmi.port=18983 -DzkClientTimeout=3
> -DzkHost=zk1:2181,zk2:2181,zk3:2181 -Dsolr.log.dir=/var/solr/logs
> -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Duser.timezone=UTC
> -Djetty.home=/opt/solr/server -Dsolr.solr.home=/var/solr/data
> -Dsolr.data.home= -Dsolr.install.dir=/opt/solr
> -Dsolr.default.confdir=/opt/solr/server/solr/configsets/_default/conf
> -Dlog4j.configurationFile=file:/var/solr/log4j2.xml -Xss256k
> -Dsolr.jetty.https.port=8983 -jar start.jar --module=http
> 4 S root90 0  0  80   0 -  4988 -  14:37 pts/000:00:00
> /bin/bash
> 0 R root9590  0  80   0 -  9595 -  14:37 pts/000:00:00
> ps -eflww
>
> Output of netstat from within the solr container (as root):
>
> root@fe0ad5b40b42:/opt/solr-8.2.0# netstat
> Active Internet connections (w/o servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address State
> tcp0  0 fe0ad5b40b42:43678  172.20.28.179:2181
>  TIME_WAIT
> tcp0  0 fe0ad5b40b42:60164  172.20.155.241:2181
> TIME_WAIT
> tcp0  0 fe0ad5b40b42:60500  172.20.60.138:2181
>  TIME_WAIT
> Active UNIX domain sockets (w/o servers)
> Proto RefCnt Flags   Type   State I-Node   Path
> unix  2  [ ] STREAM CONNECTED 129252
> unix  2  [ ] STREAM CONNECTED 129270
>
> I'm beginning to 

Re: Returning multiple fields in /graph streaming expression response

2019-07-23 Thread Ahmed Adel
Wrapping the expression in a fetch function as follows works:

fetch(names, select(nodes(enron_emails,
  nodes(enron_emails,
walk="kayne.coul...@enron.com->from",
  trackTraversal="true",
gather="to"),  walk="node->from",
scatter="leaves,branches",
 trackTraversal="true",
  gather="to"), node as from), fl="name", on="from")


however, the response loses some of its structure and no edges are
returned, i.e. it becomes:



http://graphml.graphdrawing.org/xmlns;

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;

xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd;>



  

kayne.coul...@enron.com

Kayne Coulter

  

  

randal.maff...@enron.com

Randal Maffett

  

...



which can be used as a subsequent request to the first in order to retrieve
additional fields but it would be more efficient if there's a way to
retrieve the required fields in one request.

Best,
A. Adel

On Mon, Jul 22, 2019 at 4:00 PM Ahmed Adel  wrote:

> Hi,
>
> Similar to this question (
> https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201907.mbox/browser),
> how can additional fields be returned when using /graph request handler?
>
> For example, from the documentation, for the request:
>
> nodes(enron_emails,  nodes(enron_emails,  
>   walk="kayne.coul...@enron.com->from",   
>  trackTraversal="true",   
>  gather="to"),  
> walk="node->from",  
> scatter="leaves,branches",  
> trackTraversal="true",  gather="to")
>
>
> is there a way to add more fields to the response:
>
>  xmlns="http://graphml.graphdrawing.org/xmlns"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
>  http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd;> edgedefault="directed">
>  
>node
>0
>0.0
>  
>  
>to
>1
>1.0
>  
>   target="don.baugh...@enron.com"/>
>  
>to
>1
>1.0
> 
>  target="john.kin...@enron.com"/>
> 
>   to
>   1
>   1.0
> 
>  target="jay.wi...@enron.com"/>
>
>
> Best,
> A. Adel
> http://aadel.io
>


Returning multiple fields in /graph streaming expression response

2019-07-22 Thread Ahmed Adel
Hi,

Similar to this question (
https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201907.mbox/browser),
how can additional fields be returned when using /graph request handler?

For example, from the documentation, for the request:

nodes(enron_emails,
nodes(enron_emails,
walk="kayne.coul...@enron.com->from",
  trackTraversal="true",
gather="to"),  walk="node->from",
scatter="leaves,branches",
 trackTraversal="true",
  gather="to")


is there a way to add more fields to the response:

http://graphml.graphdrawing.org/xmlns"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd;>
 
   node
   0
   0.0
 
 
   to
   1
   1.0
 
 
 
   to
   1
   1.0



  to
  1
  1.0




Best,
A. Adel
http://aadel.io


Re: Returning multiple fields in graph streaming expression response documents

2019-07-21 Thread Ahmed Adel
Yeah, it turned out to be related to the data. The “fetch” method works
fine as you described, it’s just the data distribution that caused name
field not to be fetched in a number of responses. I tested it with two
other collections and it worked as expected as well. Thank you for your
help getting this running.

Best,
A. Adel

On Sun, Jul 21, 2019 at 2:36 AM Joel Bernstein  wrote:

> Ok, then it sounds like a different issue. Let's look at the logs following
> a request and see what the issue is. There will be a log record that shows
> the query that is sent to Solr by the fetch expression. When we look at
> that log we'll be able to see what the query is, and if results are
> returned. It could be a bug in the code or it could be something related to
> the data that's being fetched.
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Sat, Jul 20, 2019 at 5:21 PM Ahmed Adel  wrote:
>
> > To validate this, I indexed the datasets and ran the same query on Solr
> > 6.5.0 environment (https://archive.apache.org/dist/lucene/solr/6.5.0/)
> > before cb9f15 commit gets into release but got the same response, no
> > additional fields, as Solr 8.1.1. I have used the default managed schema
> > settings in both Solr versions, which I guess means qparser is not used
> for
> > /select in this case, is it?
> >
> > On Sat, Jul 20, 2019 at 2:02 AM Joel Bernstein 
> wrote:
> >
> > > I suspect fetch is having problem due to this commit:
> > >
> > >
> > >
> >
> https://github.com/apache/lucene-solr/commit/cb9f151db4b5ad5c5f581b6b8cf2e5916ddb0f35#diff-98abfc8855d347035205c6f3afc2cde3
> > >
> > > Later local params were turned off for anything but the lucene qparser.
> > > Which means this query doesn't work if /select is using edismax etc...
> > >
> > > This needs to be fixed.
> > > Can you check to see if the qparser is for the /select handler on your
> > > install?
> > >
> > > Anyway fetch needs to be reverted back to it's previous implementation
> > > before the above commit basically broke it.
> > >
> > >
> > >
> > >
> > > Joel Bernstein
> > > http://joelsolr.blogspot.com/
> > >
> > >
> > > On Fri, Jul 19, 2019 at 2:20 PM Ahmed Adel  wrote:
> > >
> > > > Hi - Tried swapping the equality sides but (surprisingly?) got the
> same
> > > > exact response. Any additional thoughts are appreciated.
> > > >
> > > > Best,
> > > > A.
> > > > http://aadel.io
> > > >
> > > > On Fri, Jul 19, 2019 at 5:27 PM Joel Bernstein 
> > > wrote:
> > > >
> > > > > Try:
> > > > >
> > > > > fetch(names,
> > > > >  select(
> > > > >  nodes(emails,
> > > > >  walk="john...@apache.org->from",
> > > > >  gather="to"),
> > > > >  node as to_s),
> > > > >  fl="name",
> > > > > on="to_s=email")
> > > > >
> > > > >
> > > > > According to the docs it looks like you have the fields reversed on
> > the
> > > > > fetch. If that doesn't work, I'll investigate further.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Joel Bernstein
> > > > > http://joelsolr.blogspot.com/
> > > > >
> > > > >
> > > > > On Fri, Jul 19, 2019 at 5:51 AM Ahmed Adel 
> > wrote:
> > > > >
> > > > > > Hi Joel,
> > > > > >
> > > > > > Thank you for your thoughts. I tried the fetch function, however,
> > the
> > > > > > response does not contain "fl" fields of the "fetch" expression.
> > For
> > > > the
> > > > > > above example, the modified query is as follows:
> > > > > >
> > > > > > fetch(names, select(nodes(emails,
> > > > > >   walk="john...@apache.org->from",
> > > > > >   gather="to"), node as to_s), fl="name", on="email=to_s")
> > > > > >
> > > > > >
> > > > > > where "names" is a collection that contains two fields
> representing
> > > > pairs
> > > > > > of name and email: ("name", "ema

Re: Returning multiple fields in graph streaming expression response documents

2019-07-20 Thread Ahmed Adel
To validate this, I indexed the datasets and ran the same query on Solr
6.5.0 environment (https://archive.apache.org/dist/lucene/solr/6.5.0/)
before cb9f15 commit gets into release but got the same response, no
additional fields, as Solr 8.1.1. I have used the default managed schema
settings in both Solr versions, which I guess means qparser is not used for
/select in this case, is it?

On Sat, Jul 20, 2019 at 2:02 AM Joel Bernstein  wrote:

> I suspect fetch is having problem due to this commit:
>
>
> https://github.com/apache/lucene-solr/commit/cb9f151db4b5ad5c5f581b6b8cf2e5916ddb0f35#diff-98abfc8855d347035205c6f3afc2cde3
>
> Later local params were turned off for anything but the lucene qparser.
> Which means this query doesn't work if /select is using edismax etc...
>
> This needs to be fixed.
> Can you check to see if the qparser is for the /select handler on your
> install?
>
> Anyway fetch needs to be reverted back to it's previous implementation
> before the above commit basically broke it.
>
>
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Fri, Jul 19, 2019 at 2:20 PM Ahmed Adel  wrote:
>
> > Hi - Tried swapping the equality sides but (surprisingly?) got the same
> > exact response. Any additional thoughts are appreciated.
> >
> > Best,
> > A.
> > http://aadel.io
> >
> > On Fri, Jul 19, 2019 at 5:27 PM Joel Bernstein 
> wrote:
> >
> > > Try:
> > >
> > > fetch(names,
> > >  select(
> > >  nodes(emails,
> > >  walk="john...@apache.org->from",
> > >  gather="to"),
> > >  node as to_s),
> > >  fl="name",
> > > on="to_s=email")
> > >
> > >
> > > According to the docs it looks like you have the fields reversed on the
> > > fetch. If that doesn't work, I'll investigate further.
> > >
> > >
> > >
> > >
> > > Joel Bernstein
> > > http://joelsolr.blogspot.com/
> > >
> > >
> > > On Fri, Jul 19, 2019 at 5:51 AM Ahmed Adel  wrote:
> > >
> > > > Hi Joel,
> > > >
> > > > Thank you for your thoughts. I tried the fetch function, however, the
> > > > response does not contain "fl" fields of the "fetch" expression. For
> > the
> > > > above example, the modified query is as follows:
> > > >
> > > > fetch(names, select(nodes(emails,
> > > >   walk="john...@apache.org->from",
> > > >   gather="to"), node as to_s), fl="name", on="email=to_s")
> > > >
> > > >
> > > > where "names" is a collection that contains two fields representing
> > pairs
> > > > of name and email: ("name", "email")
> > > >
> > > > The response returned is:
> > > >
> > > > { "result-set": { "docs": [ { "to_s": "john...@apache.org"
> > > > }, { "to_s": "johnsm...@apache.org"
> > > > },
> > > > ... { "EOF": true, "RESPONSE_TIME": 33 } ] } }
> > > >
> > > > The response should have an additional "name" field in each document
> > > > returned. Any additional thoughts are appreciated.
> > > >
> > > > Best,
> > > > A.
> > > >
> > > > On Thu, Jul 18, 2019 at 6:12 PM Joel Bernstein 
> > > wrote:
> > > >
> > > > > Hi Ahmed,
> > > > >
> > > > > Take a look at the fetch
> > > > >
> > > > >
> > > >
> > >
> >
> https://lucene.apache.org/solr/guide/8_0/stream-decorator-reference.html#fetch
> > > > >
> > > > > It probably makes sense to allow more field to be returned from a
> > nodes
> > > > > expression as well.
> > > > >
> > > > > Joel Bernstein
> > > > > http://joelsolr.blogspot.com/
> > > > >
> > > > >
> > > > > On Wed, Jul 17, 2019 at 3:12 AM Ahmed Adel 
> > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Thank you for your reply. Could you give more details on the
> „join“
> > > > > > operation, such as what the sides of the join and the joining
> > > condition
>

Re: Returning multiple fields in graph streaming expression response documents

2019-07-19 Thread Ahmed Adel
Hi - Tried swapping the equality sides but (surprisingly?) got the same
exact response. Any additional thoughts are appreciated.

Best,
A.
http://aadel.io

On Fri, Jul 19, 2019 at 5:27 PM Joel Bernstein  wrote:

> Try:
>
> fetch(names,
>  select(
>  nodes(emails,
>  walk="john...@apache.org->from",
>  gather="to"),
>  node as to_s),
>  fl="name",
> on="to_s=email")
>
>
> According to the docs it looks like you have the fields reversed on the
> fetch. If that doesn't work, I'll investigate further.
>
>
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Fri, Jul 19, 2019 at 5:51 AM Ahmed Adel  wrote:
>
> > Hi Joel,
> >
> > Thank you for your thoughts. I tried the fetch function, however, the
> > response does not contain "fl" fields of the "fetch" expression. For the
> > above example, the modified query is as follows:
> >
> > fetch(names, select(nodes(emails,
> >   walk="john...@apache.org->from",
> >   gather="to"), node as to_s), fl="name", on="email=to_s")
> >
> >
> > where "names" is a collection that contains two fields representing pairs
> > of name and email: ("name", "email")
> >
> > The response returned is:
> >
> > { "result-set": { "docs": [ { "to_s": "john...@apache.org"
> > }, { "to_s": "johnsm...@apache.org"
> > },
> > ... { "EOF": true, "RESPONSE_TIME": 33 } ] } }
> >
> > The response should have an additional "name" field in each document
> > returned. Any additional thoughts are appreciated.
> >
> > Best,
> > A.
> >
> > On Thu, Jul 18, 2019 at 6:12 PM Joel Bernstein 
> wrote:
> >
> > > Hi Ahmed,
> > >
> > > Take a look at the fetch
> > >
> > >
> >
> https://lucene.apache.org/solr/guide/8_0/stream-decorator-reference.html#fetch
> > >
> > > It probably makes sense to allow more field to be returned from a nodes
> > > expression as well.
> > >
> > > Joel Bernstein
> > > http://joelsolr.blogspot.com/
> > >
> > >
> > > On Wed, Jul 17, 2019 at 3:12 AM Ahmed Adel  wrote:
> > >
> > > > Hi,
> > > >
> > > > Thank you for your reply. Could you give more details on the „join“
> > > > operation, such as what the sides of the join and the joining
> condition
> > > > would be in this case?
> > > >
> > > > Best regards,
> > > > A.
> > > >
> > > > On Tue, Jul 16, 2019 at 2:02 PM markus kalkbrenner <
> > > > markus.kalkbren...@biologis.com> wrote:
> > > >
> > > > >
> > > > >
> > > > > You have to perform a „join“ to get more fields.
> > > > >
> > > > > > Am 16.07.2019 um 13:52 schrieb Ahmed Adel :
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > How can multiple fields be returned in graph traversal streaming
> > > > > expression
> > > > > > response documents? For example, the following query:
> > > > > >
> > > > > > nodes(emails,
> > > > > >  walk="john...@apache.org->from",
> > > > > >  gather="to")
> > > > > >
> > > > > >
> > > > > > returns these documents in the response:
> > > > > >
> > > > > > {
> > > > > >  "result-set": {
> > > > > >"docs": [
> > > > > >  {
> > > > > >"node": "sl...@campbell.com",
> > > > > >"collection": "emails",
> > > > > >"field": "to",
> > > > > >"level": 1
> > > > > >  },
> > > > > >  {
> > > > > >"node": "catherine.per...@enron.com",
> > > > > >"collection": "emails",
> > > > > >"field": "to",
> > > > > >"level": 1
> > > > > >  },
> > > > > >  {
> > > > > >"node": "airam.arte...@enron.com",
> > > > > >"collection": "emails",
> > > > > >"field": "to",
> > > > > >"level": 1
> > > > > >  },
> > > > > >  {
> > > > > >"EOF": true,
> > > > > >"RESPONSE_TIME": 44
> > > > > >  }
> > > > > >]
> > > > > >  }
> > > > > > }
> > > > > >
> > > > > > How can the query above be modified to return more document
> fields,
> > > > > > "subject" for example?
> > > > > >
> > > > > > Best regards,
> > > > > >
> > > > > > A.
> > > > >
> > > >
> > >
> >
>
-- 
Sent from my iPhone


Re: Returning multiple fields in graph streaming expression response documents

2019-07-19 Thread Ahmed Adel
Hi Joel,

Thank you for your thoughts. I tried the fetch function, however, the
response does not contain "fl" fields of the "fetch" expression. For the
above example, the modified query is as follows:

fetch(names, select(nodes(emails,
  walk="john...@apache.org->from",
  gather="to"), node as to_s), fl="name", on="email=to_s")


where "names" is a collection that contains two fields representing pairs
of name and email: ("name", "email")

The response returned is:

{ "result-set": { "docs": [ { "to_s": "john...@apache.org"
}, { "to_s": "johnsm...@apache.org"
},
... { "EOF": true, "RESPONSE_TIME": 33 } ] } }

The response should have an additional "name" field in each document
returned. Any additional thoughts are appreciated.

Best,
A.

On Thu, Jul 18, 2019 at 6:12 PM Joel Bernstein  wrote:

> Hi Ahmed,
>
> Take a look at the fetch
>
> https://lucene.apache.org/solr/guide/8_0/stream-decorator-reference.html#fetch
>
> It probably makes sense to allow more field to be returned from a nodes
> expression as well.
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Wed, Jul 17, 2019 at 3:12 AM Ahmed Adel  wrote:
>
> > Hi,
> >
> > Thank you for your reply. Could you give more details on the „join“
> > operation, such as what the sides of the join and the joining condition
> > would be in this case?
> >
> > Best regards,
> > A.
> >
> > On Tue, Jul 16, 2019 at 2:02 PM markus kalkbrenner <
> > markus.kalkbren...@biologis.com> wrote:
> >
> > >
> > >
> > > You have to perform a „join“ to get more fields.
> > >
> > > > Am 16.07.2019 um 13:52 schrieb Ahmed Adel :
> > > >
> > > > Hi,
> > > >
> > > > How can multiple fields be returned in graph traversal streaming
> > > expression
> > > > response documents? For example, the following query:
> > > >
> > > > nodes(emails,
> > > >  walk="john...@apache.org->from",
> > > >  gather="to")
> > > >
> > > >
> > > > returns these documents in the response:
> > > >
> > > > {
> > > >  "result-set": {
> > > >"docs": [
> > > >  {
> > > >"node": "sl...@campbell.com",
> > > >"collection": "emails",
> > > >"field": "to",
> > > >"level": 1
> > > >  },
> > > >  {
> > > >"node": "catherine.per...@enron.com",
> > > >"collection": "emails",
> > > >"field": "to",
> > > >"level": 1
> > > >  },
> > > >  {
> > > >"node": "airam.arte...@enron.com",
> > > >"collection": "emails",
> > > >"field": "to",
> > > >"level": 1
> > > >  },
> > > >  {
> > > >"EOF": true,
> > > >"RESPONSE_TIME": 44
> > > >  }
> > > >]
> > > >  }
> > > > }
> > > >
> > > > How can the query above be modified to return more document fields,
> > > > "subject" for example?
> > > >
> > > > Best regards,
> > > >
> > > > A.
> > >
> >
>


Re: Returning multiple fields in graph streaming expression response documents

2019-07-17 Thread Ahmed Adel
Hi,

Thank you for your reply. Could you give more details on the „join“
operation, such as what the sides of the join and the joining condition
would be in this case?

Best regards,
A.

On Tue, Jul 16, 2019 at 2:02 PM markus kalkbrenner <
markus.kalkbren...@biologis.com> wrote:

>
>
> You have to perform a „join“ to get more fields.
>
> > Am 16.07.2019 um 13:52 schrieb Ahmed Adel :
> >
> > Hi,
> >
> > How can multiple fields be returned in graph traversal streaming
> expression
> > response documents? For example, the following query:
> >
> > nodes(emails,
> >  walk="john...@apache.org->from",
> >  gather="to")
> >
> >
> > returns these documents in the response:
> >
> > {
> >  "result-set": {
> >"docs": [
> >  {
> >"node": "sl...@campbell.com",
> >"collection": "emails",
> >"field": "to",
> >"level": 1
> >  },
> >  {
> >"node": "catherine.per...@enron.com",
> >"collection": "emails",
> >"field": "to",
> >"level": 1
> >  },
> >  {
> >"node": "airam.arte...@enron.com",
> >"collection": "emails",
> >"field": "to",
> >"level": 1
> >  },
> >  {
> >"EOF": true,
> >"RESPONSE_TIME": 44
> >  }
> >]
> >  }
> > }
> >
> > How can the query above be modified to return more document fields,
> > "subject" for example?
> >
> > Best regards,
> >
> > A.
>


Returning multiple fields in graph streaming expression response documents

2019-07-16 Thread Ahmed Adel
Hi,

How can multiple fields be returned in graph traversal streaming expression
response documents? For example, the following query:

nodes(emails,
  walk="john...@apache.org->from",
  gather="to")


returns these documents in the response:

{
  "result-set": {
"docs": [
  {
"node": "sl...@campbell.com",
"collection": "emails",
"field": "to",
"level": 1
  },
  {
"node": "catherine.per...@enron.com",
"collection": "emails",
"field": "to",
"level": 1
  },
  {
"node": "airam.arte...@enron.com",
"collection": "emails",
"field": "to",
"level": 1
  },
  {
"EOF": true,
"RESPONSE_TIME": 44
  }
]
  }
}

How can the query above be modified to return more document fields,
"subject" for example?

Best regards,

A.


Re: Faceting with Stats

2019-07-05 Thread Ahmed Adel
Thanks for your reply! Yes, it turned out to be an issue with the way the
request was being sent, which was cURL that required special handling and
escaping of spaces and special characters. Using another client cleared
this issue and the request below worked perfectly now.

Best,
A.

On Thu, Jul 4, 2019 at 4:53 PM Erick Erickson 
wrote:

> Might be a formatting error with my mail client, but the very first line
> is not well formed.
>
> q: * is incorrect
>
> q=*:*
>
>
>
> I do not see that example on the page either. Looks like you took the bit
> that starts with stats=true and mis-typed the q clause.
>
> Best,
> Erick
> > On Jul 3, 2019, at 5:08 AM, Ahmed Adel  wrote:
> >
> > Hi,
> >
> > As per the documentation recommendation of using pivot with stats
> component
> > instead (
> >
> https://lucene.apache.org/solr/guide/8_1/faceting.html#combining-stats-component-with-pivots
> ),
> > replacing the stats options that were previously used with the newer
> pivot
> > options as follows:
> >
> > q: *
> > stats=true
> > stats.field={!tag=piv1 mean=true}average_rating_f
> > facet=true
> > facet.pivot={!stats=piv1}author_s
> >
> > returns the following error:
> >
> > Bad Message 400
> > reason: Illegal character SPACE=' '
> >
> > This is a syntax issue rather than a logical one, however. Any thoughts
> of
> > what could be missing would be appreciated.
> >
> > Thanks,
> > A. Adel
> >
> > On Tue, Jul 2, 2019 at 4:38 PM Ahmed Adel  wrote:
> >
> >> Hi,
> >>
> >> How can stats field value be calculated for top facet values? In other
> >> words, the following request parameters should return the stats.field
> >> measures for facets sorted by count:
> >>
> >> q: *
> >> wt: json
> >> stats: true
> >> stats.facet: authors_s
> >> stats.field: average_rating_f
> >> facet.missing: true
> >> f.authors_s.facet.sort: count
> >>
> >> However, the response is not sorted by facet field count. Is there
> >> something missing?
> >>
> >> Best,
> >> A.
> >>
>
> --
Sent from my iPhone


Re: Faceting with Stats

2019-07-04 Thread Ahmed Adel
Hi,

As per the documentation recommendation of using pivot with stats component
instead (
https://lucene.apache.org/solr/guide/8_1/faceting.html#combining-stats-component-with-pivots),
replacing the stats options that were previously used with the newer pivot
options as follows:

q: *
stats=true
stats.field={!tag=piv1 mean=true}average_rating_f
facet=true
facet.pivot={!stats=piv1}author_s

returns the following error:

Bad Message 400
reason: Illegal character SPACE=' '

This is a syntax issue rather than a logical one, however. Any thoughts of
what could be missing would be appreciated.

Thanks,
A. Adel

On Tue, Jul 2, 2019 at 4:38 PM Ahmed Adel  wrote:

> Hi,
>
> How can stats field value be calculated for top facet values? In other
> words, the following request parameters should return the stats.field
> measures for facets sorted by count:
>
> q: *
> wt: json
> stats: true
> stats.facet: authors_s
> stats.field: average_rating_f
> facet.missing: true
> f.authors_s.facet.sort: count
>
> However, the response is not sorted by facet field count. Is there
> something missing?
>
> Best,
> A.
>


Re: Faceting with Stats

2019-07-03 Thread Ahmed Adel
Hi,

As per the documentation recommendation of using pivot with stats component
instead (
https://lucene.apache.org/solr/guide/8_1/faceting.html#combining-stats-component-with-pivots),
replacing the stats options that were previously used with the newer pivot
options as follows:

q: *
stats=true
stats.field={!tag=piv1 mean=true}average_rating_f
facet=true
facet.pivot={!stats=piv1}author_s

returns the following error:

Bad Message 400
reason: Illegal character SPACE=' '

This is a syntax issue rather than a logical one, however. Any thoughts of
what could be missing would be appreciated.

Thanks,
A. Adel

On Tue, Jul 2, 2019 at 4:38 PM Ahmed Adel  wrote:

> Hi,
>
> How can stats field value be calculated for top facet values? In other
> words, the following request parameters should return the stats.field
> measures for facets sorted by count:
>
> q: *
> wt: json
> stats: true
> stats.facet: authors_s
> stats.field: average_rating_f
> facet.missing: true
> f.authors_s.facet.sort: count
>
> However, the response is not sorted by facet field count. Is there
> something missing?
>
> Best,
> A.
>


Faceting with Stats

2019-07-02 Thread Ahmed Adel
Hi,

How can stats field value be calculated for top facet values? In other
words, the following request parameters should return the stats.field
measures for facets sorted by count:

q: *
wt: json
stats: true
stats.facet: authors_s
stats.field: average_rating_f
facet.missing: true
f.authors_s.facet.sort: count

However, the response is not sorted by facet field count. Is there
something missing?

Best,
A.


clusterstate.json is sometimes out-of-sync

2015-04-09 Thread Ahmed Adel
What I really meant is trying to get cluster status directly through ZK
API. Your approach a bit different from what I meant but it's a nice one as
it seems will work across versions 4 and 5.

On Thursday, April 9, 2015, Shalin Shekhar Mangar shalinman...@gmail.com
javascript:_e(%7B%7D,'cvml','shalinman...@gmail.com'); wrote:

 I don't quite follow. Are you saying that you intend to use the ZK REST API
 to fetch live_nodes and then send the 'clusterstatus' API call to one of
 the live nodes?

 On Thu, Apr 9, 2015 at 7:13 PM, Ahmed Adel ahmed.a...@badrit.com wrote:

  In fact, the advantage I see of using ZK is that we don't have to iterate
  over nodes in case the first node receiving that request is down,
 whereas,
  by using ZK REST API, we can do that in a single request as I assume we
 can
  check live_nodes (in case this approach is guaranteed when using Solr
 4.x)
  and send the request directly to a live node. Let me know if this makes
  sense.
 
  On Thu, Apr 9, 2015 at 2:31 PM, Shalin Shekhar Mangar 
  shalinman...@gmail.com wrote:
 
   Yes, you can use the 'clusterstatus' API which will return an
 aggregation
   of all states. See
  
  
 
 https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api18
  
  
   On Thu, Apr 9, 2015 at 5:52 PM, Ahmed Adel ahmed.a...@badrit.com
  wrote:
  
Hi Shalin,
   
Thanks for your response. I'm actually looking inside ZooKeeper in
  order
   to
obtain highest availability. What I expected is that
 clusterstate.json
contains the aggregation of all state.json children nodes of each
collection. But your second paragraph explains the behavior I see in
  Solr
5.0 while others using prior versions of Solr don't see.
   
By the way, is there one method to retrieve state across 4.x and 5.x?
  It
seems that there are different methods depending on Solr version.
   
On Thu, Apr 9, 2015 at 12:23 PM, Shalin Shekhar Mangar 
shalinman...@gmail.com wrote:
   
 Hi Ahmed,

 Can you give more details? What did you expect and what was the
  actual?
 Also, are you looking directly at the clusterstate.json inside
   ZooKeeper
or
 are you using the 'clusterstatus' Collection API?

 You shouldn't look at the clusterstate.json directly because 1)
  things
like
 live-ness is not stored in clusterstate.json and 2) collections
  created
 with Solr 5.0 have their own individual state.json inside
 /collections/collection_name/state.json

 On Thu, Apr 9, 2015 at 3:37 PM, Ahmed Adel ahmed.a...@badrit.com
wrote:

  Hi All,
 
  On Solr 5.0 and ZK 3.4.6 sometimes clusterstate.json does not
  reflect
the
  aggregation of states of collections, the latter is always
  correct. I
 could
  verify this from the admin panel (under Tree view) and from
 ZKCli.
  Is
 there
  something I'm missing that could generate this issue?
 
  --
 
  A. Adel
 



 --
 Regards,
 Shalin Shekhar Mangar.

   
   
   
--
A. Adel
   
  
  
  
   --
   Regards,
   Shalin Shekhar Mangar.
  
 
 
 
  --
  *Ahmed Adel*
  www.badrit.com
  http://s.wisestamp.com/links?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2F
 



 --
 Regards,
 Shalin Shekhar Mangar.



-- 
Sent from my iPhone


Re: clusterstate.json is sometimes out-of-sync

2015-04-09 Thread Ahmed Adel
In fact, the advantage I see of using ZK is that we don't have to iterate
over nodes in case the first node receiving that request is down, whereas,
by using ZK REST API, we can do that in a single request as I assume we can
check live_nodes (in case this approach is guaranteed when using Solr 4.x)
and send the request directly to a live node. Let me know if this makes
sense.

On Thu, Apr 9, 2015 at 2:31 PM, Shalin Shekhar Mangar 
shalinman...@gmail.com wrote:

 Yes, you can use the 'clusterstatus' API which will return an aggregation
 of all states. See

 https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api18


 On Thu, Apr 9, 2015 at 5:52 PM, Ahmed Adel ahmed.a...@badrit.com wrote:

  Hi Shalin,
 
  Thanks for your response. I'm actually looking inside ZooKeeper in order
 to
  obtain highest availability. What I expected is that clusterstate.json
  contains the aggregation of all state.json children nodes of each
  collection. But your second paragraph explains the behavior I see in Solr
  5.0 while others using prior versions of Solr don't see.
 
  By the way, is there one method to retrieve state across 4.x and 5.x? It
  seems that there are different methods depending on Solr version.
 
  On Thu, Apr 9, 2015 at 12:23 PM, Shalin Shekhar Mangar 
  shalinman...@gmail.com wrote:
 
   Hi Ahmed,
  
   Can you give more details? What did you expect and what was the actual?
   Also, are you looking directly at the clusterstate.json inside
 ZooKeeper
  or
   are you using the 'clusterstatus' Collection API?
  
   You shouldn't look at the clusterstate.json directly because 1) things
  like
   live-ness is not stored in clusterstate.json and 2) collections created
   with Solr 5.0 have their own individual state.json inside
   /collections/collection_name/state.json
  
   On Thu, Apr 9, 2015 at 3:37 PM, Ahmed Adel ahmed.a...@badrit.com
  wrote:
  
Hi All,
   
On Solr 5.0 and ZK 3.4.6 sometimes clusterstate.json does not reflect
  the
aggregation of states of collections, the latter is always correct. I
   could
verify this from the admin panel (under Tree view) and from ZKCli. Is
   there
something I'm missing that could generate this issue?
   
--
   
A. Adel
   
  
  
  
   --
   Regards,
   Shalin Shekhar Mangar.
  
 
 
 
  --
  A. Adel
 



 --
 Regards,
 Shalin Shekhar Mangar.




-- 
*Ahmed Adel*
www.badrit.com
http://s.wisestamp.com/links?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2F


clusterstate.json is sometimes out-of-sync

2015-04-09 Thread Ahmed Adel
Hi All,

On Solr 5.0 and ZK 3.4.6 sometimes clusterstate.json does not reflect the
aggregation of states of collections, the latter is always correct. I could
verify this from the admin panel (under Tree view) and from ZKCli. Is there
something I'm missing that could generate this issue?

-- 

A. Adel


Re: clusterstate.json is sometimes out-of-sync

2015-04-09 Thread Ahmed Adel
Hi Shalin,

Thanks for your response. I'm actually looking inside ZooKeeper in order to
obtain highest availability. What I expected is that clusterstate.json
contains the aggregation of all state.json children nodes of each
collection. But your second paragraph explains the behavior I see in Solr
5.0 while others using prior versions of Solr don't see.

By the way, is there one method to retrieve state across 4.x and 5.x? It
seems that there are different methods depending on Solr version.

On Thu, Apr 9, 2015 at 12:23 PM, Shalin Shekhar Mangar 
shalinman...@gmail.com wrote:

 Hi Ahmed,

 Can you give more details? What did you expect and what was the actual?
 Also, are you looking directly at the clusterstate.json inside ZooKeeper or
 are you using the 'clusterstatus' Collection API?

 You shouldn't look at the clusterstate.json directly because 1) things like
 live-ness is not stored in clusterstate.json and 2) collections created
 with Solr 5.0 have their own individual state.json inside
 /collections/collection_name/state.json

 On Thu, Apr 9, 2015 at 3:37 PM, Ahmed Adel ahmed.a...@badrit.com wrote:

  Hi All,
 
  On Solr 5.0 and ZK 3.4.6 sometimes clusterstate.json does not reflect the
  aggregation of states of collections, the latter is always correct. I
 could
  verify this from the admin panel (under Tree view) and from ZKCli. Is
 there
  something I'm missing that could generate this issue?
 
  --
 
  A. Adel
 



 --
 Regards,
 Shalin Shekhar Mangar.




--
A. Adel


Re: Log numfound, qtime, ...

2015-03-04 Thread Ahmed Adel
Hi, I believe a better approach than Solarium is to create a custom search
component that extends SearchComponent class and override process() method
to store query, QTime, and numFound to a database for further analysis.
This approach would cut steps 2 through 6 into one step. Analysis can be
done using Banana (https://github.com/LucidWorks/banana) analytics and
search dashboard.

On Fri, Feb 27, 2015 at 1:36 PM, Mikhail Khludnev 
mkhlud...@griddynamics.com wrote:

 Did you check Kibana/Banana ?

 On Fri, Feb 27, 2015 at 2:07 PM, bengates benga...@aliceadsl.fr wrote:

  Hello everyone,
 
  Here's my need : I'd like to log Solr Responses so as to achieve some
  business statistics.
  I'd like to report, as a daily/weekly/yearly/whateverly basis, the
  following
  KPIs :
  - Most popular requests (hits)
  - Average numfound for each request
  - Average response time for each request
  - Requests that have returned an error
  - Request that have a numfound of 0.
 
  The idea is to give the searchandizer the keys to analyze and enhance in
  real-time the relevancy of his data. I think it's not the job of a
  developer
  to detect that the keyword TV never has results because Television is
 the
  referring word in the whole catalog, for instance. The searchandizer
 should
  analyze this at anytime and provide the correct synonyms to improve
  relevance.
 
  I'm using Solr with PHP and the Solarium library.
  Actually the only way I found to manage this, is the following way :
 
  1. The user sends the request
  2. Nginx intercepts the request, and forwards it to a PHP app
  3. The PHP app loads the Solarium library and forwards the request to
  Solr/Jetty
  4. Solr replies a JSON and Solarium turns it into a PHP Solarium Response
  Object
  5. The PHP app sends the user the raw JSON through NGINX (as if it were
  Jetty)
  6. The PHP app stores the query, the QTime and the numfound in a database
 
  I think I'll soon get into performance issues, as you guess.
  Do you know a better approach ?
 
  Thanks,
  Ben
 
 
 
  --
  View this message in context:
  http://lucene.472066.n3.nabble.com/Log-numfound-qtime-tp4189561.html
  Sent from the Solr - User mailing list archive at Nabble.com.
 



 --
 Sincerely yours
 Mikhail Khludnev
 Principal Engineer,
 Grid Dynamics

 http://www.griddynamics.com
 mkhlud...@griddynamics.com




-- 
A. Adel


Re: Facet By Distance

2015-02-26 Thread Ahmed Adel
Thank you for your replies, added q and it works! I agree the examples are
a bit confusing. It turned out also that points are clustered around the
center and had to increase d as well.

On Wed, Feb 25, 2015 at 11:46 PM, Alexandre Rafalovitch arafa...@gmail.com
wrote:

 In the examples it used to default to *:* with default params, which
 caused even more confusion.

 Regards,
Alex.
 
 Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
 http://www.solr-start.com/


 On 25 February 2015 at 15:21, david.w.smi...@gmail.com
 david.w.smi...@gmail.com wrote:
  If 'q' is absent, then you always match nothing (there may be
 exceptions?);
  so it's sort of required, in effect.  I wish it defaulted to *:*.
 
  ~ David Smiley
  Freelance Apache Lucene/Solr Search Consultant/Developer
  http://www.linkedin.com/in/davidwsmiley
 
  On Wed, Feb 25, 2015 at 2:28 PM, Ahmed Adel ahmed.a...@badrit.com
 wrote:
 
  Hi,
  Thank you for your reply. I added a filter query to the query in two
 ways
  as follows:
 
 
 
 fq={!geofilt}sfield=start_stationpt=40.71754834,-74.01322069facet.query={!frange
  l=0.0 u=0.1}geodist()facet.query={!frange l=0.10001
 u=0.2}geodist()d=0.2
  -- returns 0 docs
 
 
 q=*:*fq={!geofilt}sfield=start_stationpt=40.71754834,-74.01322069d=0.2
  -- returns 1484 docs
 
  Not sure why the first query with returns 0 documents
 
  On Wed, Feb 25, 2015 at 8:46 PM, david.w.smi...@gmail.com 
  david.w.smi...@gmail.com wrote:
 
   Hi,
   This will return all the documents in the index because you did
 nothing
   to filter them out.  Your query is *:* (everything) and there are no
  filter
   queries.
  
   ~ David Smiley
   Freelance Apache Lucene/Solr Search Consultant/Developer
   http://www.linkedin.com/in/davidwsmiley
  
   On Wed, Feb 25, 2015 at 12:27 PM, Ahmed Adel ahmed.a...@badrit.com
   wrote:
  
Hello,
   
I'm trying to get Facet By Distance working on an index with
 LatLonType
fields. The schema is as follows:
   
fields
...
field name=trip_duration type=int indexed=true
 stored=true/
field name=start_station type=location indexed=true
  stored=true
   /
field name=end_station type=location indexed=true
 stored=true
  /
field name=birth_year type=int stored=true/
field name=gender type=int stored=true /
...
/fields
   
   
And the query I'm running is:
   
   
  
 
 q=*:*sfield=start_stationpt=40.71754834,-74.01322069facet.query={!frange
l=0.0 u=0.1}geodist()facet.query={!frange l=0.10001 u=0.2}geodist()
   
   
But it returns all the documents in the index so it seems something
 is
missing. I'm using Solr 4.9.0.
   
--
   
A. Adel
   
  
 
  A. Adel
 




-- 
A. Adel


Facet By Distance

2015-02-25 Thread Ahmed Adel
Hello,

I'm trying to get Facet By Distance working on an index with LatLonType
fields. The schema is as follows:

fields
...
field name=trip_duration type=int indexed=true stored=true/
field name=start_station type=location indexed=true stored=true /
field name=end_station type=location indexed=true stored=true /
field name=birth_year type=int stored=true/
field name=gender type=int stored=true /
...
/fields


And the query I'm running is:

q=*:*sfield=start_stationpt=40.71754834,-74.01322069facet.query={!frange
l=0.0 u=0.1}geodist()facet.query={!frange l=0.10001 u=0.2}geodist()


But it returns all the documents in the index so it seems something is
missing. I'm using Solr 4.9.0.

--

A. Adel


Re: Facet By Distance

2015-02-25 Thread Ahmed Adel
Hi,
Thank you for your reply. I added a filter query to the query in two ways
as follows:

fq={!geofilt}sfield=start_stationpt=40.71754834,-74.01322069facet.query={!frange
l=0.0 u=0.1}geodist()facet.query={!frange l=0.10001 u=0.2}geodist()d=0.2
-- returns 0 docs

q=*:*fq={!geofilt}sfield=start_stationpt=40.71754834,-74.01322069d=0.2
-- returns 1484 docs

Not sure why the first query with returns 0 documents

On Wed, Feb 25, 2015 at 8:46 PM, david.w.smi...@gmail.com 
david.w.smi...@gmail.com wrote:

 Hi,
 This will return all the documents in the index because you did nothing
 to filter them out.  Your query is *:* (everything) and there are no filter
 queries.

 ~ David Smiley
 Freelance Apache Lucene/Solr Search Consultant/Developer
 http://www.linkedin.com/in/davidwsmiley

 On Wed, Feb 25, 2015 at 12:27 PM, Ahmed Adel ahmed.a...@badrit.com
 wrote:

  Hello,
 
  I'm trying to get Facet By Distance working on an index with LatLonType
  fields. The schema is as follows:
 
  fields
  ...
  field name=trip_duration type=int indexed=true stored=true/
  field name=start_station type=location indexed=true stored=true
 /
  field name=end_station type=location indexed=true stored=true /
  field name=birth_year type=int stored=true/
  field name=gender type=int stored=true /
  ...
  /fields
 
 
  And the query I'm running is:
 
 
 q=*:*sfield=start_stationpt=40.71754834,-74.01322069facet.query={!frange
  l=0.0 u=0.1}geodist()facet.query={!frange l=0.10001 u=0.2}geodist()
 
 
  But it returns all the documents in the index so it seems something is
  missing. I'm using Solr 4.9.0.
 
  --
 
  A. Adel
 


A. Adel


Indexed epoch time in Solr

2015-01-25 Thread Ahmed Adel
Hi All,

Is there a way to convert unix time field that is already indexed to
ISO-8601 format in query response? If this is not possible on the query
level, what is the best way to copy this field to a new Solr standard date
field.

Thanks,

-- 
*Ahmed Adel*
http://s.wisestamp.com/links?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2F


Re: Export feature issue in Solr 4.10

2014-10-04 Thread Ahmed Adel
Thanks Joel, I changed enableLazyFieldLoading to false and it worked just
fine.

However, for some reason, I was expecting it to return
content-disposition: attachment in the response. Maybe because response
of this request would most probably be huge and if returned to the browser,
it makes sense to be downloaded as browser won't be able to handle it
efficiently, at least by supplying a request parameter. What do you think?

A. Adel
On Oct 2, 2014 11:06 PM, Joel Bernstein joels...@gmail.com wrote:

 There is bug in how the export handler is working when you have very few
 documents in the index and the solrconfig.xml is configured to enable lazy
 document loading:

 enableLazyFieldLoadingtrue/enableLazyFieldLoading

 The tests didn't catch this because lazy loading was set to the default
 which is false in the tests. The manual testing I did, didn't catch this
 because I tested with a large number of documents in the index.

 Your example will work if you change:

 enableLazyFieldLoadingfalse/enableLazyFieldLoading

 And if you load a typical index with lots of documents you should have no
 problems running with lazy loading enabled.

 I'll create jira to fix this issue.








 Joel Bernstein
 Search Engineer at Heliosearch

 On Thu, Oct 2, 2014 at 4:10 PM, Joel Bernstein joels...@gmail.com wrote:

  Yep getting the same error. Investigating...
 
  Joel Bernstein
  Search Engineer at Heliosearch
 
  On Thu, Oct 2, 2014 at 12:59 PM, Ahmed Adel ahmed.a...@badrit.com
 wrote:
 
  Hi All,
 
  I'm trying to use Solr 4.10 export feature, but I'm getting an error.
  Maybe
  I missed something.
 
  Here's the scenario:
 
 
 1. Download Solr 4.10.0
 2. Use collection1 schema out of the box
 3. Add docValues=true to price and pages fields in schema.xml
 4. Index books.json using command line:
 curl http://localhost:8984/solr/collection1/update -H
  Content-Type: text/json --data-binary
  @example/exampledocs/books.json
 5. Try running this query:
 
 
 http://localhost:8984/solr/collection1/export?q=*:*sort=price%20ascfl=price
 6. Here's the error I get:
 
 java.lang.IllegalArgumentException: docID must be = 0 and 
  maxDoc=4 (got docID=4)
  at
 
 org.apache.lucene.index.BaseCompositeReader.readerIndex(BaseCompositeReader.java:182)
  at
 
 org.apache.lucene.index.BaseCompositeReader.document(BaseCompositeReader.java:109)
  at
  org.apache.solr.search.SolrIndexSearcher.doc(SolrIndexSearcher.java:700)
  at
 
 org.apache.solr.util.SolrPluginUtils.optimizePreFetchDocs(SolrPluginUtils.java:213)
  at
 
 org.apache.solr.handler.component.QueryComponent.doPrefetch(QueryComponent.java:623)
  at
 
 org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:507)
  at
 
 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)
  at
 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
  at org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)
  ...
 
 
  Any ideas what could be missing?
 
  Thanks,
  A. Adel
 
 
 



Export feature issue in Solr 4.10

2014-10-02 Thread Ahmed Adel
Hi All,

I'm trying to use Solr 4.10 export feature, but I'm getting an error. Maybe
I missed something.

Here's the scenario:


   1. Download Solr 4.10.0
   2. Use collection1 schema out of the box
   3. Add docValues=true to price and pages fields in schema.xml
   4. Index books.json using command line:
   curl http://localhost:8984/solr/collection1/update -H
Content-Type: text/json --data-binary
@example/exampledocs/books.json
   5. Try running this query:
   http://localhost:8984/solr/collection1/export?q=*:*sort=price%20ascfl=price
   6. Here's the error I get:

   java.lang.IllegalArgumentException: docID must be = 0 and 
maxDoc=4 (got docID=4)
at 
org.apache.lucene.index.BaseCompositeReader.readerIndex(BaseCompositeReader.java:182)
at 
org.apache.lucene.index.BaseCompositeReader.document(BaseCompositeReader.java:109)
at 
org.apache.solr.search.SolrIndexSearcher.doc(SolrIndexSearcher.java:700)
at 
org.apache.solr.util.SolrPluginUtils.optimizePreFetchDocs(SolrPluginUtils.java:213)
at 
org.apache.solr.handler.component.QueryComponent.doPrefetch(QueryComponent.java:623)
at 
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:507)
at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)
...


Any ideas what could be missing?

Thanks,
A. Adel