Examples of fields()


Examples of org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.fields()

      if ((typeVariableBinding.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
        Util.recordNestedType(classFile, typeVariableBinding);
      }
    }
    // add its fields
    FieldBinding[] fields = typeBinding.fields();
    if ((fields != null) && (fields != Binding.NO_FIELDS)) {
      classFile.addFieldInfos();
    } else {
      // we have to set the number of fields to be equals to 0
      classFile.contents[classFile.contentsOffset++] = 0;
View Full Code Here

Examples of org.elasticsearch.action.explain.ExplainRequest.fields()

        String sField = request.param("fields");
        if (sField != null) {
            String[] sFields = Strings.splitStringByCommaToArray(sField);
            if (sFields != null) {
                explainRequest.fields(sFields);
            }
        }

        explainRequest.fetchSourceContext(FetchSourceContext.parseFromRestRequest(request));
View Full Code Here

Examples of org.elasticsearch.action.get.GetRequest.fields()

        String sField = request.param("fields");
        if (sField != null) {
            String[] sFields = Strings.splitStringByCommaToArray(sField);
            if (sFields != null) {
                getRequest.fields(sFields);
            }
        }


        client.get(getRequest, new ActionListener<GetResponse>() {
View Full Code Here

Examples of org.elasticsearch.action.get.MultiGetRequest.Item.fields()

      if (expected.getClass() != item.getClass()) return false;
      Item other = (Item) item;
      return expected.index().equals(other.index())
          && expected.type().equals(other.type())
          && expected.id().equals(other.id())
          && Arrays.equals(expected.fields(), other.fields());
    }

    @Override
    public void describeTo(Description description) {}
View Full Code Here

Examples of org.elasticsearch.action.mlt.MoreLikeThisRequest.fields()

    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        MoreLikeThisRequest mltRequest = moreLikeThisRequest(request.param("index")).type(request.param("type")).id(request.param("id"));
        try {
            mltRequest.fields(request.paramAsStringArray("mlt_fields", null));
            mltRequest.percentTermsToMatch(request.paramAsFloat("percent_terms_to_match", -1));
            mltRequest.minTermFreq(request.paramAsInt("min_term_freq", -1));
            mltRequest.maxQueryTerms(request.paramAsInt("max_query_terms", -1));
            mltRequest.stopWords(request.paramAsStringArray("stop_words", null));
            mltRequest.minDocFreq(request.paramAsInt("min_doc_freq", -1));
View Full Code Here

Examples of org.elasticsearch.action.update.UpdateRequest.fields()

    }

    protected UpdateRequest buildUpdateRequest(ESUpdateNode node) {
        UpdateRequest request = new UpdateRequest(node.indices()[0],
                Constants.DEFAULT_MAPPING_TYPE, node.ids().get(0));
        request.fields(node.columns());
        request.paths(node.updateDoc());
        if (node.version().isPresent()) {
            request.version(node.version().get());
        } else {
            request.retryOnConflict(Constants.UPDATE_RETRY_ON_CONFLICT);
View Full Code Here

Examples of org.elasticsearch.common.lucene.all.AllEntries.fields()

        DocumentMapper docMapper = MapperTests.newParser().parse(mapping);
        byte[] json = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/all/test1.json");
        Document doc = docMapper.parse(json).rootDoc();
        AllField field = (AllField) doc.getFieldable("_all");
        AllEntries allEntries = ((AllTokenStream) field.tokenStreamValue()).allEntries();
        assertThat(allEntries.fields().size(), equalTo(3));
        assertThat(allEntries.fields().contains("address.last.location"), equalTo(true));
        assertThat(allEntries.fields().contains("name.last"), equalTo(true));
        assertThat(allEntries.fields().contains("simple1"), equalTo(true));
    }
View Full Code Here

Examples of org.elasticsearch.common.lucene.all.AllEntries.fields()

        byte[] json = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/all/test1.json");
        Document doc = docMapper.parse(json).rootDoc();
        AllField field = (AllField) doc.getFieldable("_all");
        AllEntries allEntries = ((AllTokenStream) field.tokenStreamValue()).allEntries();
        assertThat(allEntries.fields().size(), equalTo(3));
        assertThat(allEntries.fields().contains("address.last.location"), equalTo(true));
        assertThat(allEntries.fields().contains("name.last"), equalTo(true));
        assertThat(allEntries.fields().contains("simple1"), equalTo(true));
    }

    @Test public void testSimpleAllMappersWithReparse() throws Exception {
View Full Code Here

Examples of org.elasticsearch.index.fieldvisitor.CustomFieldsVisitor.fields()

        boolean forceSource = searchContext.highlight().forceSource(field);
        List<Object> textsToHighlight;
        if (!forceSource && mapper.fieldType().stored()) {
            CustomFieldsVisitor fieldVisitor = new CustomFieldsVisitor(ImmutableSet.of(mapper.names().indexName()), false);
            hitContext.reader().document(hitContext.docId(), fieldVisitor);
            textsToHighlight = fieldVisitor.fields().get(mapper.names().indexName());
            if (textsToHighlight == null) {
                // Can happen if the document doesn't have the field to highlight
                textsToHighlight = ImmutableList.of();
            }
        } else {
View Full Code Here

Examples of org.elasticsearch.index.fieldvisitor.FieldsVisitor.fields()

            } catch (IOException e) {
                throw new ElasticsearchException("Failed to get type [" + type + "] and id [" + id + "]", e);
            }
            source = fieldVisitor.source();

            if (!fieldVisitor.fields().isEmpty()) {
                fieldVisitor.postProcess(docMapper);
                fields = new HashMap<>(fieldVisitor.fields().size());
                for (Map.Entry<String, List<Object>> entry : fieldVisitor.fields().entrySet()) {
                    fields.put(entry.getKey(), new GetField(entry.getKey(), entry.getValue()));
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.