Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index info #148

Closed
sokil opened this issue Jan 10, 2017 · 1 comment
Closed

Index info #148

sokil opened this issue Jan 10, 2017 · 1 comment
Labels
Milestone

Comments

@sokil
Copy link

sokil commented Jan 10, 2017

When created sparse index:

<?php
$collection->createIndex($array(
    'sparseAsc'     => 1,
    'sparseDesc'    => -1,
), ['sparse' => true])

then $collection->getIndexInfo() gives:

  1 => 
  array (
    'v' => 2,
    'key' => 
    array (
      'sparseAsc' => 1,
      'sparseDesc' => -1,
    ),
    'name' => 'sparseAsc_1_sparseDesc_-1',
    'ns' => 'test.phpmongo_test_collection',
    'sparse' => true,
  ),

Your implementation has no parameter 'sparse' in
https://github.com/alcaeus/mongo-php-adapter/blob/master/lib/Mongo/MongoCollection.php#L706-L724
but IndexInfo has method isSparse.

Same with expireAfterSeconds and textIndexVersion.

@sokil sokil changed the title Index creation response Index info Jan 11, 2017
@alcaeus
Copy link
Owner

alcaeus commented Jan 11, 2017

Again, thanks for the report. #150 fixes this.

@alcaeus alcaeus added the bug label Jan 11, 2017
@alcaeus alcaeus added this to the 1.0.8 milestone Jan 11, 2017
@alcaeus alcaeus closed this as completed Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants