query « query « Java Lucene Q&A

Home
Java Lucene Q&A
1.Database
2.Development
3.document
4.Field
5.index
6.lucene
7.lucene.net
8.nutch
9.query
10.solr
11.Tools
Java Lucene Q&A » query » query 

1. Prevent "Too Many Clauses" on lucene query    stackoverflow.com

In my tests I suddenly bumped into a Too Many Clauses exception when trying to get the hits from a boolean query that consisted of a termquery and a wildcard query. I ...

2. Faster way to get distinct values from Lucene Query    stackoverflow.com

Currently I do like this:

IndexSearcher searcher = new IndexSearcher(lucenePath);
Hits hits = searcher.Search(query);
Document doc;
List<string> companyNames = new List<string>();

for (int i = 0; i < hits.Length(); i++)
{
    doc = hits.Doc(i);
 ...

3. Faceted query browser for SOLR    stackoverflow.com

Can you recommend a faceted query browser that I can point at a SOLR index? Ideally this would be something that looks like an Endeca-built GUI, where the various facets ...

4. How do I add an EdgeNGramTokenFilter to a Compass Query?    stackoverflow.com

I am building some auto-complete functionality using compass and I need to add an EdgeNGramTokenFilter to the compass query but I cannot see how I can add it. Is this possible?

5. Lucene query permutation    stackoverflow.com

I have a question regarding performing a lucene query involving permutation. Say I have two fields: "name" and "keyword" and the user searches for "joes pizza restaurant". I want some part ...

6. Lucene's nested query evaluation regarding negation    stackoverflow.com

I am adding Apache Lucene support to Querydsl (which offers type-safe queries for Java) and I am having problems understanding how Lucene evaluates queries ...

7. lucene query size- does this scale? query for '1 OR 2 OR 3 .. OR N'    stackoverflow.com

Suppose I have a lucene query 'id1 OR id2 OR id3 ... idN'. How well does that scale as N increases? The situation I'm looking at would be similar to someone ...

8. Reusing Lucene Query objects    stackoverflow.com

Are Lucene's Query objects reusable/stateless ? If not, will clone()ing a TermQuery be faster than rebuilding it ?

9. Weird query behavior need some help debugging this    stackoverflow.com

Here is the interresting part of the schema :

    <fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">
  <analyzer type="index">
    <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" ...

10. Question Regarding SolrFilter Query?    stackoverflow.com

I have a question that if Perform search in way that i have given "Solr/Lucene Statement" also "Filter Query" at solr admin page.. which one of both would be searched first. ...

11. Show the whole query in Solr    stackoverflow.com

I can't manage to get shown all the query when I make a research in Solr. This is my log4j.properties.

log4j.rootLogger=INFO,CONSOLE
log4j.logger.org.springframework=INFO,CONSOLE
log4j.logger.org.apache=DEBUG,CONSOLE
#log4j.logger.CONTENT=INFO,CONSOLE

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.immediateFlush=true
log4j.appender.CONSOLE.target=System.out
log4j.appender.CONSOLE.threshold=ALL
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{dd-MMM-yyyy HH:mm:ss} %c %t%n[%p]: %m%n
Thanks in advance

12. Problems with solr queries    stackoverflow.com

when I make a search against Solr in my local machine, I get a query like this: http://localhost:8080/solr/project/select/?q=concept&version=2.2&start=0&rows=10&indent=on But instead, I would like to get a complete query with ...

13. Keeping query statistics using lucene    stackoverflow.com

I am developing a search component of a web application using Lucene. I would like to save the user queries to an index and use them to suggest alternate queries to ...

14. Solr query - Is there a way to limit the size of a text field in the response    stackoverflow.com

Is there a way to limit the amount of text in a text field from a query? Here's a quick scenario.... I have 2 fields:

  • docId - int
  • text - string.
I ...

15. How do I NOT analyze a clause in the lucene query parser?    stackoverflow.com

I'm using the Lucene query parser for a simple search front-end and I'm running into some problems. Each record that I'm storing has some fields that are analyzed and some ...

16. solr multiple tokenizers for query    stackoverflow.com

I am rather new to SolR. I would like to use multiple tokenizers. I am using the standard tokenizer so that words get split via \t, space, comma, etc. Now I would like ...

17. Lucene: what are the hits for the query?    stackoverflow.com

I've just seen in 1 totalHits and scoreHits return the top and total number of hits for the query respectively. What does "hit" mean exactly ? Is it the ...

18. Lucene not null query?    stackoverflow.com

How can we construct a query to search for particular field to be not null. field_name:* is not working. I tried field_name:[a* to z*] this works fine for english, but does not cover ...

19. Lucene: Can I run a query against few specific docs of the collection only?    stackoverflow.com

Can I run a query against few specific docs of the collection only ? Can I filter the built collection according to documents fields content ? For example I would like to query ...

20. Query Apache Solr for metadata    stackoverflow.com

I was wondering if it was possible to query Solr for some index-metadata, e.g. the most frequent words in the index? If so, how do you do this? Unfortunately I wasn't able ...

21. solr query with white space    stackoverflow.com

I search for a word and i get the results with facet as follows

<lst name="itemtype">
<int name="Internal">108</int>
<int name="Users">73</int>
<int name="Factory">18</int>
<int name="Supply Chain Intermediaries">6</int>
<int name="Company">1</int>
<int name="Monitor/Auditor firm">0</int>
</lst>
then i wrote the condition like fq=itemtype:Factory i ...

22. how to use "name in (name1,name2)" in lucene query    stackoverflow.com

How do I use "where field in (value1,value2,value3)" in lucene query? I'm using lucene query in dotCMS.

23. Dealing with many calendars and good way to store / query them    stackoverflow.com

Some model first : We have Ad that contain a Calendar. Each date has a boolean (more like a ternary valued field, but that does not change the problem) to check ...

24. What's a recommended strategy to replace ord() and rord() function queries in Solr?    stackoverflow.com

I'm using the rord() function in Solr queries in order to boost query results against a "rank" field, using a syntax something like this:

bf=rord(cur_rank)^1.8
The algorithm works well, but recent changes in ...

25. Solr 4.0 specific query    stackoverflow.com

Have Solr document:

<doc>
  <field name="name">El Chikilin De MaZaTlAn Sin</field>
  <field name="imageUrl">http://a4.l3-images.myspacecdn.com/images02/113/d4b1567ba13b46309335f9160dc56206/m.jpg</field>
  <field name="Sex">M</field>
  <field name="Age">25</field>
  <field name="Location">Norwalk, CA 90650, USA</field>
  <field name="Country">United States</field>
  ...

26. Querying in Solr    stackoverflow.com

I want to know what are the query classes that Solr use for querying. And what are the difference in querying using lucene and Solr

27. Writing AND in query for Solr    stackoverflow.com

I'd like to send a query to Local Solr. Currently I'm sending this: http://localhost:9001/solrfacetsearch/master_Shop/select/?q=keyword_text_mv%3Aapple&version=2.2&start=0&rows=10&indent=on&qt=geo&lat=52.398&long=4.93653&radius=2000&debugQuery=true. As you can see, the query is keyword_text_mv : apple I'd like to send apple AND orange. How ...

28. solr RequestHandler to run multiple queries in a batch    stackoverflow.com

solr RequestHandler to run multiple queries in a batch PleaSE help me... how to ru the multiple query at one shot and it should return the result.. Thank in advance

29. Solr Custom RequestHandler - injecting query parameters    stackoverflow.com

Short question: I'm looking for a way (java) to intercept a query to Solr and inject a few extra filtering parameters provided by my business logic. What structures should I use? Context: ...

30. Slow first query after update    stackoverflow.com

I have a 9Gb index and when I update the index (with delta-import or via xml), the first query is always very slow. I have FastLRUCache and a newSearcher query configured ...

31. Query problem in Solr    stackoverflow.com

We're using Solr to search on a Shop index and a Product index. Currently a Shop has a field shop_keyword which also contains the keywords of the products assigned to it. ...

32. What is the default query in solr    stackoverflow.com

What is the default query type in solr. for example if i search for white diamond then it returns the docs containing white or solr or both. it means it is ...

33. SOLR - How to handle inner Query    stackoverflow.com

How would we query this clause in the SOLR and (Jobseeker.eid not in (select eid from jobseeker_emailresume where cid = #usecid# and datesent >= #createodbcdate(emaileddate)# )) To do it in SOLR i am ...

34. how can I build a lucene query with two or more "in" clauses    stackoverflow.com

My document in Lucene (solr, really) has several fields, lets call them textField1, numField1, numField2. My application will have a list of search terms words1 textField needs to query against, a list ...

35. Lucene Query clause to always return true?    stackoverflow.com

Is there a Lucene clause to always return true? I am building my queries programmatically, and I believe it'll be useful if I can insert a clause which will always evaluate ...

36. Span Queries in SOLR    stackoverflow.com

How does one issue span queries in SOLR (Span, SpanNear, etc)? I've done a bit of research and I can't tell of a straightforward way to do it. It would seem that ...

37. A good way to make Solr "understand" facets from a simple query    stackoverflow.com

I have business listings which have:

  1. business category (string,facetable)
  2. location (string,facetable)
  3. address (text,searchable)
  4. business keywords (text,searchable)
A user's search is as simple as "ornamental fish in MG Road" and I want him to set him up ...

38. problem with Lucene's automagical query conversion    stackoverflow.com

Recently I have started using Lucene. However, after few days I've spotted that queries provided by me in form of Strings are converted by Lucene to more general ones. Example:

MY QUERY: "want ...

39. Solr/Lucene Query Validation    stackoverflow.com

Does anyone have a regex that can be used to validate that a query to be sent to lucene is is well formatted?

40. how to make the schema of solr    stackoverflow.com

We have a document structure which has title , abstract a user can enter many comments[commentuser,commentdata,commenttext] in it . and a document can have many authors [name,city], for e.g for document field ...

41. Intersection query with Lucene    stackoverflow.com

With Zned Lucene, when i search for field1:value1, I have 1000 hits returned. When I search for field2:value2, I have 0 hits returned. And when i search for field1:value1 AND field2:value2, I have ...

42. Any way to merge two queries in solr?    stackoverflow.com

In my project, we use solr to index a lot of different kind of documents, by example Books and Persons, with some common fields (like the name) and some type-specific fields ...

43. Comparison of two Solr queries    stackoverflow.com

Assume that by themselves the following:

  • q=foo returns two million results
  • q=type:SalesOrder returns 300,000 results
  • q=refId:12345 returns 2,000 results
Default operator is OR. If users will be making many queries like what I list below: Namely,
  • Query A: ...

44. SOLR EDISMAX query    stackoverflow.com

I have field "spell" with text "Quanti disperati si rovescerebbero con i barconi sulle nostre.." I can search via edismax like this one:

q={!field f=spell}disperati si rovescerebbero' - OK
or
q={!prefix f=spell}disperat' - OK
but how ...

45. Solr: Query and return x number of types    stackoverflow.com

I have a large index of files. One of the fields I have is "content_type". This field stores the basic type for a file (i.e. pdf, image, video, document, ...

46. Solr prefix query with ISOLatin1Accent characters    stackoverflow.com

I'm trying to index a field in a way that allows me to find the document using prefix query 'æb*' as well as 'aeb*'. What happens: it finds the latter, but ...

47. Query data that starts with numbers only    stackoverflow.com

Hello I have a field in Solr that start with 1 or more digits. For e.g

  • 123Adam- R Test
  • 2Adam Test
  • 534534As
  • ABCSD
  • A person
How can I configure a field type, such that it will match any ...

48. Can Solr have an autowarm query against the Luke Admin handler on startup?    stackoverflow.com

Is there any way to include the query:

/solr/admin/luke?show=schema
As part of the auto-warming phase that's run before the searcher is ready to service queries? It seems that you can only auto-warm with ...

49. Query releases information about Apache Lucene Java    stackoverflow.com

I am writing my master thesis about Identification Indicators, for defect prediction of project's releases. I am using the project Lucene Java from Apache Software Foundation for my experiment. I would ...

50. Concatenation of Solr fq queries    stackoverflow.com

I have what seems at first blush to be a simple problem, but I can't get meaningful Solr results from a two part query. I want to return all records which either ...

51. solr function query multi token    stackoverflow.com

I want to implement a custom function query, in which I want the data of a text field. The field has multiple tokens, and I want the number of tokens present in ...

52. How do I combine two Lucene queries using OR?    stackoverflow.com

I'd like to search my index on two fields called "a" and "b". I am given searches like Freud -- theories of psychology and I'd like to perform the following ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.