Source Code Cross Referenced for DocList.java in  » Search-Engine » apache-solr-1.2.0 » org » apache » solr » search » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » apache solr 1.2.0 » org.apache.solr.search 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */package org.apache.solr.search;
017:
018:        /**
019:         * <code>DocList</code> represents the result of a query: an ordered list of document ids with optional score.
020:         * This list contains a subset of the complete list of documents actually matched: <code>size()</code>
021:         * document ids starting at <code>offset()</code>.
022:         *
023:         * @author yonik
024:         * @version $Id: DocList.java 472574 2006-11-08 18:25:52Z yonik $
025:         * @since solr 0.9
026:         */
027:        public interface DocList extends DocSet {
028:
029:            /**
030:             * Returns the zero based offset of this list within the total ordered list of matches to the query.
031:             */
032:            public int offset();
033:
034:            /**
035:             * Returns the number of ids in this list.
036:             */
037:            public int size();
038:
039:            /**
040:             * Returns the total number of matches for the search
041:             * (as opposed to just the number collected according
042:             * to <code>offset()</code> and <code>size()</code>).
043:             * Hence it's always true that matches() >= size()
044:             * @return number of matches for the search(query &amp; any filters)
045:             */
046:            public int matches();
047:
048:            /***
049:            public int getDoc(int pos);
050:             ***/
051:
052:            // hmmm, what if a different slice could be generated from an existing DocSet
053:            // (and was before)...
054:            // how to distinguish cached values from logical values?
055:            // docSet could represent docs 10-20, but actually contain 0-100
056:            // should the big slice be cached independently, and a new class called
057:            // DocListSubset be created to refer to a range within the DocList?
058:            /**
059:             * Get a subset of an existing DocList.
060:             * Returns null if not possible.
061:             */
062:            public DocList subset(int offset, int len);
063:
064:            /**
065:             * Returns an iterator that may be used to iterate over the documents in this DocList
066:             *
067:             * <p>
068:             * The order of the documents returned by this iterator is based on the
069:             * Sort order of the search that produced it.  The Scoring information
070:             * is meaningful only if <code>hasScores()</code> returns true.
071:             * </p>
072:             * @see #hasScores
073:             */
074:            public DocIterator iterator();
075:
076:            /** True if scores were retained */
077:            public boolean hasScores();
078:
079:            /** The maximum score for the search... only valid if
080:             * scores were retained (if hasScores()==true)
081:             */
082:            public float maxScore();
083:        }
084:
085:        /****  Maybe do this at a higher level (more efficient)
086:
087:         class SmartDocSet implements DocSet {
088:         static int INITIAL_SIZE=10;
089:         static int TRANSITION_SIZE=10;
090:
091:         protected BitSet bits;
092:         int size;
093:
094:         protected int[] arr;     // keep small set as an array, or as a hash?
095:         protected int arrsize;
096:
097:         public SmartDocSet() {
098:         if (INITIAL_SIZE>0) {
099:         arr=new int[INITIAL_SIZE];
100:         } else {
101:         bits=new BitSet();
102:         }
103:         }
104:
105:
106:         public void addUnique(int doc) {
107:         size++;
108:         if (bits != null) {
109:         bits.set(doc);
110:         }
111:         else {
112:         if (arrsize<10) {
113:         arr[arrsize++]=doc;
114:         } else  {
115:         // TODO: transition to bit set
116:         }
117:         }
118:         };
119:
120:         public int size() {
121:         return size;
122:         }
123:         public boolean exists(int docid) {
124:         return false;
125:         }
126:         public DocSet intersection(DocSet other) {
127:         return null;
128:
129:         }
130:         public DocSet union(DocSet other) {
131:         return null;
132:         }
133:         }
134:         ***/
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.